summaryrefslogtreecommitdiff
path: root/src/Network/Tox
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox')
-rw-r--r--src/Network/Tox/Onion/Handlers.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Network/Tox/Onion/Handlers.hs b/src/Network/Tox/Onion/Handlers.hs
index 94ece8ab..99ef3c69 100644
--- a/src/Network/Tox/Onion/Handlers.hs
+++ b/src/Network/Tox/Onion/Handlers.hs
@@ -112,7 +112,7 @@ announceH routing toks keydb oaddr req = do
112 Just _ | isJust storing -> Acknowledged newtok 112 Just _ | isJust storing -> Acknowledged newtok
113 Just (AnnouncedRoute ni _) -> SendBackKey $ id2key (nodeId ni) 113 Just (AnnouncedRoute ni _) -> SendBackKey $ id2key (nodeId ni)
114 let response = AnnounceResponse k ns 114 let response = AnnounceResponse k ns
115 hPutStrLn stderr $ unwords ["Announce:", show req, "-reply->", show response] 115 dput XAnnounce $ unwords ["Announce:", show req, "-reply->", show response]
116 return response 116 return response
117 117
118dataToRouteH :: 118dataToRouteH ::
@@ -123,18 +123,18 @@ dataToRouteH ::
123 -> IO () 123 -> IO ()
124dataToRouteH keydb udp _ (OnionToRoute pub asymm) = do 124dataToRouteH keydb udp _ (OnionToRoute pub asymm) = do
125 let k = key2id pub 125 let k = key2id pub
126 hPutStrLn stderr $ "dataToRouteH "++ show k 126 dput XOnion $ "dataToRouteH "++ show k
127 mb <- atomically $ do 127 mb <- atomically $ do
128 ks <- readTVar keydb 128 ks <- readTVar keydb
129 forM (MinMaxPSQ.lookup' k (keyAssoc ks)) $ \(p,(cnt,rpath)) -> do 129 forM (MinMaxPSQ.lookup' k (keyAssoc ks)) $ \(p,(cnt,rpath)) -> do
130 writeTVar keydb $ ks { keyAssoc = MinMaxPSQ.insert' k (cnt + 1, rpath) p (keyAssoc ks) } 130 writeTVar keydb $ ks { keyAssoc = MinMaxPSQ.insert' k (cnt + 1, rpath) p (keyAssoc ks) }
131 return rpath 131 return rpath
132 hPutStrLn stderr $ "dataToRouteH "++ show (fmap (const ()) mb) 132 dput XOnion $ "dataToRouteH "++ show (fmap (const ()) mb)
133 forM_ mb $ \rpath -> do 133 forM_ mb $ \rpath -> do
134 -- forward 134 -- forward
135 hPutStrLn stderr $ "dataToRouteH sendMessage" 135 dput XOnion $ "dataToRouteH sendMessage"
136 sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse asymm 136 sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse asymm
137 hPutStrLn stderr $ "Forwarding data-to-route -->"++show k 137 dput XOnion $ "Forwarding data-to-route -->"++show k
138 138
139type NodeDistance = NodeId 139type NodeDistance = NodeId
140 140