mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-23 11:39:43 +01:00
update debugServerCall for changes to fields. Fixes debug builds. (#33)
This commit is contained in:
parent
a530faf912
commit
51891bb026
1 changed files with 8 additions and 10 deletions
|
@ -32,20 +32,18 @@ serverCallCancel sc code reason =
|
||||||
|
|
||||||
debugServerCall :: ServerCall -> IO ()
|
debugServerCall :: ServerCall -> IO ()
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
debugServerCall call@(ServerCall (C.Call ptr) _ _ _) = do
|
debugServerCall call@ServerCall{..} = do
|
||||||
|
let (C.Call ptr) = unServerCall
|
||||||
grpcDebug $ "debugServerCall(U): server call: " ++ (show ptr)
|
grpcDebug $ "debugServerCall(U): server call: " ++ (show ptr)
|
||||||
grpcDebug $ "debugServerCall(U): metadata ptr: "
|
grpcDebug $ "debugServerCall(U): metadata: "
|
||||||
++ show (requestMetadataRecv call)
|
++ show requestMetadataRecv
|
||||||
metadataArr <- peek (requestMetadataRecv call)
|
forM_ parentPtr $ \parentPtr' -> do
|
||||||
metadata <- C.getAllMetadataArray metadataArr
|
|
||||||
grpcDebug $ "debugServerCall(U): metadata received: " ++ (show metadata)
|
|
||||||
forM_ (parentPtr call) $ \parentPtr' -> do
|
|
||||||
grpcDebug $ "debugServerCall(U): parent ptr: " ++ show parentPtr'
|
grpcDebug $ "debugServerCall(U): parent ptr: " ++ show parentPtr'
|
||||||
(C.Call parent) <- peek parentPtr'
|
(C.Call parent) <- peek parentPtr'
|
||||||
grpcDebug $ "debugServerCall(U): parent: " ++ show parent
|
grpcDebug $ "debugServerCall(U): parent: " ++ show parent
|
||||||
grpcDebug $ "debugServerCall(U): callDetails ptr: "
|
grpcDebug $ "debugServerCall(U): deadline: " ++ show callDeadline
|
||||||
++ show (callDetails call)
|
grpcDebug $ "debugServerCall(U): method: " ++ show callMethod
|
||||||
--TODO: need functions for getting data out of call_details.
|
grpcDebug $ "debugServerCall(U): host: " ++ show callHost
|
||||||
#else
|
#else
|
||||||
{-# INLINE debugServerCall #-}
|
{-# INLINE debugServerCall #-}
|
||||||
debugServerCall = const $ return ()
|
debugServerCall = const $ return ()
|
||||||
|
|
Loading…
Reference in a new issue