diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-14 21:06:35 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-16 00:14:18 -0500 |
commit | f00396cf25cf3aaf3f1e4209804bede37d79605f (patch) | |
tree | d00e4e56239cfc503ca123d0550766db05a4125b | |
parent | ebe24e703ea95f444d3da851fcc7f4f5230bc1c1 (diff) |
Reclassified some Relay prints to RelayVerbose.
-rw-r--r-- | dht/src/DebugTag.hs | 1 | ||||
-rw-r--r-- | dht/src/Network/Tox/Relay.hs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/dht/src/DebugTag.hs b/dht/src/DebugTag.hs index 75d07ef8..93b5b74f 100644 --- a/dht/src/DebugTag.hs +++ b/dht/src/DebugTag.hs | |||
@@ -12,6 +12,7 @@ data DebugTag | |||
12 | | XNetCrypto | 12 | | XNetCrypto |
13 | | XOnion | 13 | | XOnion |
14 | | XRelay | 14 | | XRelay |
15 | | XRelayVerbose | ||
15 | | XRoutes | 16 | | XRoutes |
16 | | XPing | 17 | | XPing |
17 | | XJabber | 18 | | XJabber |
diff --git a/dht/src/Network/Tox/Relay.hs b/dht/src/Network/Tox/Relay.hs index 6a1f04fa..d2c8f98a 100644 --- a/dht/src/Network/Tox/Relay.hs +++ b/dht/src/Network/Tox/Relay.hs | |||
@@ -222,7 +222,7 @@ handlePacket cons thistcp thisKey crypto sendOnion sendToClient session = \case | |||
222 | RelayPing x -> sendToClient $ RelayPong x -- TODO x==0 is invalid. Do we care? | 222 | RelayPing x -> sendToClient $ RelayPong x -- TODO x==0 is invalid. Do we care? |
223 | 223 | ||
224 | OOBSend them bs -> do | 224 | OOBSend them bs -> do |
225 | dput XRelay $ "OOB send from " ++ showKey256 thisKey ++ " to " ++ showKey256 them | 225 | dput XRelayVerbose $ "OOB send from " ++ showKey256 thisKey ++ " to " ++ showKey256 them |
226 | m <- atomically $ Map.lookup them <$> readTVar cons | 226 | m <- atomically $ Map.lookup them <$> readTVar cons |
227 | forM_ m $ \(sendToThem,_) -> sendToThem $ OOBRecv thisKey bs | 227 | forM_ m $ \(sendToThem,_) -> sendToThem $ OOBRecv thisKey bs |
228 | 228 | ||
@@ -236,7 +236,7 @@ handlePacket cons thistcp thisKey crypto sendOnion sendToClient session = \case | |||
236 | i <- c2key con | 236 | i <- c2key con |
237 | sendToThem' <- IntMap.lookup i $ associated mySession | 237 | sendToThem' <- IntMap.lookup i $ associated mySession |
238 | return $ sendToThem' $ RelayData bs | 238 | return $ sendToThem' $ RelayData bs |
239 | dput XRelay $ "RelayData from " ++ showKey256 thisKey ++ " to conid=" | 239 | dput XRelayVerbose $ "RelayData from " ++ showKey256 thisKey ++ " to conid=" |
240 | ++ show con ++ maybe " (no key)" (\io -> " (associated key)") mbSendIt | 240 | ++ show con ++ maybe " (no key)" (\io -> " (associated key)") mbSendIt |
241 | sequence_ mbSendIt | 241 | sequence_ mbSendIt |
242 | 242 | ||