From 2cffde93a0d814ebb54bdcbd3d6e598cbaae6ee1 Mon Sep 17 00:00:00 2001 From: James Crayne Date: Tue, 29 May 2018 04:05:14 +0000 Subject: some more dput call sites --- src/Network/Tox/Onion/Handlers.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') 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 Just _ | isJust storing -> Acknowledged newtok Just (AnnouncedRoute ni _) -> SendBackKey $ id2key (nodeId ni) let response = AnnounceResponse k ns - hPutStrLn stderr $ unwords ["Announce:", show req, "-reply->", show response] + dput XAnnounce $ unwords ["Announce:", show req, "-reply->", show response] return response dataToRouteH :: @@ -123,18 +123,18 @@ dataToRouteH :: -> IO () dataToRouteH keydb udp _ (OnionToRoute pub asymm) = do let k = key2id pub - hPutStrLn stderr $ "dataToRouteH "++ show k + dput XOnion $ "dataToRouteH "++ show k mb <- atomically $ do ks <- readTVar keydb forM (MinMaxPSQ.lookup' k (keyAssoc ks)) $ \(p,(cnt,rpath)) -> do writeTVar keydb $ ks { keyAssoc = MinMaxPSQ.insert' k (cnt + 1, rpath) p (keyAssoc ks) } return rpath - hPutStrLn stderr $ "dataToRouteH "++ show (fmap (const ()) mb) + dput XOnion $ "dataToRouteH "++ show (fmap (const ()) mb) forM_ mb $ \rpath -> do -- forward - hPutStrLn stderr $ "dataToRouteH sendMessage" + dput XOnion $ "dataToRouteH sendMessage" sendMessage udp (toOnionDestination rpath) $ OnionToRouteResponse asymm - hPutStrLn stderr $ "Forwarding data-to-route -->"++show k + dput XOnion $ "Forwarding data-to-route -->"++show k type NodeDistance = NodeId -- cgit v1.2.3