diff options
Diffstat (limited to 'src/Data/PacketQueue.hs')
-rw-r--r-- | src/Data/PacketQueue.hs | 6 |
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] | |||
89 | getMissing PacketQueue { pktq, seqno, qsize, buffend } = do | 89 | getMissing 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 | ||