diff options
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r-- | src/Network/Tox.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 93e3c663..29591a23 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -247,12 +247,12 @@ addVerbosity :: Transport err SockAddr ByteString -> Transport err SockAddr Byte | |||
247 | addVerbosity tr = | 247 | addVerbosity tr = |
248 | tr { awaitMessage = \kont -> awaitMessage tr $ \m -> do | 248 | tr { awaitMessage = \kont -> awaitMessage tr $ \m -> do |
249 | forM_ m $ mapM_ $ \(msg,addr) -> do | 249 | forM_ m $ mapM_ $ \(msg,addr) -> do |
250 | when (isLocalHost addr || not (B.null msg || elem (B.head msg) [0,1,2,4,0x81,0x82,0x8c,0x8d])) $ do | 250 | when (not (B.null msg || elem (B.head msg) [0,1,2,4,0x81,0x82,0x8c,0x8d])) $ do |
251 | mapM_ (\x -> hPutStrLn stderr ( (show addr) ++ " --> " ++ x)) | 251 | mapM_ (\x -> hPutStrLn stderr ( (show addr) ++ " --> " ++ x)) |
252 | $ xxd 0 msg | 252 | $ xxd 0 msg |
253 | kont m | 253 | kont m |
254 | , sendMessage = \addr msg -> do | 254 | , sendMessage = \addr msg -> do |
255 | when (isLocalHost addr || not (B.null msg || elem (B.head msg) [0,1,2,4,0x81,0x82,0x8c,0x8d])) $ do | 255 | when (not (B.null msg || elem (B.head msg) [0,1,2,4,0x81,0x8c,0x8d])) $ do |
256 | mapM_ (\x -> hPutStrLn stderr ( (show addr) ++ " <-- " ++ x)) | 256 | mapM_ (\x -> hPutStrLn stderr ( (show addr) ++ " <-- " ++ x)) |
257 | $ xxd 0 msg | 257 | $ xxd 0 msg |
258 | sendMessage tr addr msg | 258 | sendMessage tr addr msg |