diff options
author | Joe Crayne <joe@jerkface.net> | 2020-01-11 13:59:13 -0500 |
---|---|---|
committer | Joe Crayne <joe@jerkface.net> | 2020-01-11 13:59:13 -0500 |
commit | f8ef399a959eaacf14c09e5bd0794de934f397eb (patch) | |
tree | 4bc690cfeb1a66eca04a6f69b41c4b9cffcffa4a /dht/src/Network | |
parent | 0e3c922142177b093d90cba81d0b6712172e1f57 (diff) |
Reclassifying debug prints.
Diffstat (limited to 'dht/src/Network')
-rw-r--r-- | dht/src/Network/Tox.hs | 4 | ||||
-rw-r--r-- | dht/src/Network/Tox/Onion/Handlers.hs | 8 | ||||
-rw-r--r-- | dht/src/Network/Tox/Relay.hs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/dht/src/Network/Tox.hs b/dht/src/Network/Tox.hs index 1a3bee79..a7e5d2c2 100644 --- a/dht/src/Network/Tox.hs +++ b/dht/src/Network/Tox.hs | |||
@@ -266,11 +266,11 @@ newTox :: TVar Onion.AnnouncedKeys -- ^ Store of announced keys we are a rende | |||
266 | newTox keydb bindspecs onsess crypto usetcp = do | 266 | newTox keydb bindspecs onsess crypto usetcp = do |
267 | msock <- Bind.udpTransport' True bindspecs | 267 | msock <- Bind.udpTransport' True bindspecs |
268 | let failedBind = do | 268 | let failedBind = do |
269 | dput XDHT $ "tox udp bind error: " ++ show bindspecs | 269 | dput XMisc $ "tox udp bind error: " ++ show bindspecs |
270 | throwIO $ userError "Tox UDP listen port?" | 270 | throwIO $ userError "Tox UDP listen port?" |
271 | fromMaybe failedBind $ msock <&> \(udp,sock) -> do | 271 | fromMaybe failedBind $ msock <&> \(udp,sock) -> do |
272 | addr <- getSocketName sock | 272 | addr <- getSocketName sock |
273 | dput XOnion $ "UDP bind address: " ++ show addr | 273 | dput XMisc $ "UDP bind address: " ++ show addr |
274 | (relay,sendTCP) <- | 274 | (relay,sendTCP) <- |
275 | if usetcp then do | 275 | if usetcp then do |
276 | fmap (Just *** Just) $ tcpRelay (fst crypto) addr $ \a x -> do | 276 | fmap (Just *** Just) $ tcpRelay (fst crypto) addr $ \a x -> do |
diff --git a/dht/src/Network/Tox/Onion/Handlers.hs b/dht/src/Network/Tox/Onion/Handlers.hs index 8db1c534..ca7d47db 100644 --- a/dht/src/Network/Tox/Onion/Handlers.hs +++ b/dht/src/Network/Tox/Onion/Handlers.hs | |||
@@ -121,18 +121,18 @@ dataToRouteH :: | |||
121 | -> IO () | 121 | -> IO () |
122 | dataToRouteH keydb udp _ (OnionToRoute pub asymm) = do | 122 | dataToRouteH keydb udp _ (OnionToRoute pub asymm) = do |
123 | let k = key2id pub | 123 | let k = key2id pub |
124 | dput XOnion $ "dataToRouteH "++ show k | 124 | dput XAnnounce $ "dataToRouteH "++ show k |
125 | mb <- atomically $ do | 125 | mb <- atomically $ do |
126 | ks <- readTVar keydb | 126 | ks <- readTVar keydb |
127 | forM (MinMaxPSQ.lookup' k (keyAssoc ks)) $ \(p,(cnt,rpath)) -> do | 127 | forM (MinMaxPSQ.lookup' k (keyAssoc ks)) $ \(p,(cnt,rpath)) -> do |
128 | writeTVar keydb $ ks { keyAssoc = MinMaxPSQ.insert' k (cnt + 1, rpath) p (keyAssoc ks) } | 128 | writeTVar keydb $ ks { keyAssoc = MinMaxPSQ.insert' k (cnt + 1, rpath) p (keyAssoc ks) } |
129 | return rpath | 129 | return rpath |
130 | dput XOnion $ "dataToRouteH "++ show (fmap (const ()) mb) | 130 | dput XAnnounce $ "dataToRouteH "++ show (fmap (const ()) mb) |
131 | forM_ mb $ \rpath -> do | 131 | forM_ mb $ \rpath -> do |
132 | -- forward | 132 | -- forward |
133 | dput XOnion $ "dataToRouteH sendMessage" | 133 | dput XAnnounce $ "dataToRouteH sendMessage" |
134 | sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse asymm | 134 | sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse asymm |
135 | dput XOnion $ "Forwarding data-to-route -->"++show k | 135 | dput XAnnounce $ "Forwarding data-to-route -->"++show k |
136 | 136 | ||
137 | type NodeDistance = NodeId | 137 | type NodeDistance = NodeId |
138 | 138 | ||
diff --git a/dht/src/Network/Tox/Relay.hs b/dht/src/Network/Tox/Relay.hs index 66ab4b71..b315648a 100644 --- a/dht/src/Network/Tox/Relay.hs +++ b/dht/src/Network/Tox/Relay.hs | |||
@@ -272,7 +272,7 @@ tcpRelay crypto udp_addr sendOnion = do | |||
272 | b33445 <- getBindAddress "33445" True | 272 | b33445 <- getBindAddress "33445" True |
273 | bany <- getBindAddress "" True | 273 | bany <- getBindAddress "" True |
274 | h <- forkStreamServer ServerConfig | 274 | h <- forkStreamServer ServerConfig |
275 | { serverWarn = dput XOnion | 275 | { serverWarn = dput XMisc |
276 | , serverSession = relaySession crypto clients cons sendOnion | 276 | , serverSession = relaySession crypto clients cons sendOnion |
277 | } | 277 | } |
278 | [b443,b80,b3389,udp_addr,b33445,bany] | 278 | [b443,b80,b3389,udp_addr,b33445,bany] |