diff options
author | joe <joe@jerkface.net> | 2017-10-25 05:09:55 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-10-25 05:09:55 -0400 |
commit | 44573e84be43e4396f4508edb3c04760b6bf8efc (patch) | |
tree | 7568d8c1c2c367604ba9da4d91aca773ff4647b1 /src/Network/Tox.hs | |
parent | f0f355d6ff8a68b5240301f882f6d5a9a77fdba1 (diff) |
Debugged encodeDataToRoute/parseDataToRoute.
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 |