summaryrefslogtreecommitdiff
path: root/src/Data/PacketQueue.hs
diff options
context:
space:
mode:
authorjim@bo <jim@bo>2018-06-24 07:11:13 -0400
committerjim@bo <jim@bo>2018-06-24 07:15:08 -0400
commit5c2c19dfa55f0a319d78411e21fdd0cb5dcc4547 (patch)
tree96a24defb45ef489c5647fbf4a25e53ab57cb1a8 /src/Data/PacketQueue.hs
parentc781c88c3cd77b70694a26c3f27ff82aa6fa65d3 (diff)
debug traces of packet request send/recieve
Diffstat (limited to 'src/Data/PacketQueue.hs')
-rw-r--r--src/Data/PacketQueue.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Data/PacketQueue.hs b/src/Data/PacketQueue.hs
index 93f9ba14..6f997ac0 100644
--- a/src/Data/PacketQueue.hs
+++ b/src/Data/PacketQueue.hs
@@ -89,13 +89,11 @@ getMissing :: Show a => PacketQueue a -> STM [Word32]
89getMissing PacketQueue { pktq, seqno, qsize, buffend } = do 89getMissing PacketQueue { pktq, seqno, qsize, buffend } = do
90 seqno0 <- readTVar seqno 90 seqno0 <- readTVar seqno
91 buffend0 <- readTVar buffend 91 buffend0 <- readTVar buffend
92 -- tput XNetCrypto $ "getMissing: seqno = " ++ show seqno0
93 -- tput XNetCrypto $ "getMissing: buffend0 = " ++ show buffend0
94 -- note relying on fact that [ b .. a ] is null when a < b 92 -- note relying on fact that [ b .. a ] is null when a < b
95 let indices = take (fromIntegral qsize) $ map (`mod` qsize) [ seqno0 .. buffend0 - 1] 93 let indices = take (fromIntegral qsize) $ map (`mod` qsize) [ seqno0 .. buffend0 - 1]
96 -- tput XNetCrypto $ "indices: " ++ show indices 94 -- tput XNetCrypto $ "(netCRYPTO getMissing indices: " ++ show indices
97 maybes <- mapM (\i -> do {x <- readArray pktq i; return (i,x)}) indices 95 maybes <- mapM (\i -> do {x <- readArray pktq i; return (i,x)}) indices
98 -- tput XNetCrypto $ "getMissing: maybers = " ++ show maybes 96 tput XNetCrypto $ "(netCRYPTO) getMissing: (" ++ show seqno0 ++ " " ++ show buffend0 ++") => " ++ show maybes
99 let nums = map fst . filter (isNothing . snd) $ maybes 97 let nums = map fst . filter (isNothing . snd) $ maybes
100 return nums 98 return nums
101 99