diff options
Diffstat (limited to 'dht/ToxManager.hs')
-rw-r--r-- | dht/ToxManager.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dht/ToxManager.hs b/dht/ToxManager.hs index 408b12d2..39377733 100644 --- a/dht/ToxManager.hs +++ b/dht/ToxManager.hs | |||
@@ -327,13 +327,16 @@ gotDhtPubkey theirDhtKey tx theirKey = do | |||
327 | , rumoredAddress = assume akey | 327 | , rumoredAddress = assume akey |
328 | } | 328 | } |
329 | 329 | ||
330 | showak :: AnnounceKey -> String | ||
331 | showak k = unpackAnnounceKey (txAnnouncer tx) k | ||
332 | |||
330 | assume :: AnnounceKey -> POSIXTime -> SockAddr -> NodeInfo -> STM () | 333 | assume :: AnnounceKey -> POSIXTime -> SockAddr -> NodeInfo -> STM () |
331 | assume akey time addr ni = | 334 | assume akey time addr ni = |
332 | tput XNodeinfoSearch $ show ("rumor", akey, time, addr, ni) | 335 | tput XNodeinfoSearch $ show ("rumor", showak akey, time, addr, ni) |
333 | 336 | ||
334 | observe :: AnnounceKey -> POSIXTime -> NodeInfo -> STM () | 337 | observe :: AnnounceKey -> POSIXTime -> NodeInfo -> STM () |
335 | observe akey time ni@(nodeAddr -> addr) = do | 338 | observe akey time ni@(nodeAddr -> addr) = do |
336 | tput XNodeinfoSearch $ show ("observation", akey, time, addr) | 339 | tput XNodeinfoSearch $ show ("observation", showak akey, time, addr) |
337 | setContactAddr time theirKey ni (txAccount tx) | 340 | setContactAddr time theirKey ni (txAccount tx) |
338 | 341 | ||
339 | gotAddr :: NodeInfo -> ToxToXMPP -> PublicKey -> IO () | 342 | gotAddr :: NodeInfo -> ToxToXMPP -> PublicKey -> IO () |
@@ -408,7 +411,7 @@ gotAddr' ni@(nodeAddr -> addr) tx theirKey theirDhtKey = atomically blee | |||
408 | getCookie ni isActive getC ann akey now = getCookieAgain | 411 | getCookie ni isActive getC ann akey now = getCookieAgain |
409 | where | 412 | where |
410 | getCookieAgain = do | 413 | getCookieAgain = do |
411 | tput XNodeinfoSearch $ show ("getCookieAgain", akey) | 414 | tput XNodeinfoSearch $ show ("getCookieAgain", unpackAnnounceKey ann akey) |
412 | mbContact <- getC | 415 | mbContact <- getC |
413 | case mbContact of | 416 | case mbContact of |
414 | Nothing -> return $ return () | 417 | Nothing -> return $ return () |