From 1b3b665cb8413ed519fab1fa560716736676fa59 Mon Sep 17 00:00:00 2001 From: Joe Crayne Date: Thu, 1 Nov 2018 21:51:00 -0400 Subject: Comments and debug prints. --- src/Network/Tox/Session.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Network/Tox/Session.hs') diff --git a/src/Network/Tox/Session.hs b/src/Network/Tox/Session.hs index c672087f..968b3503 100644 --- a/src/Network/Tox/Session.hs +++ b/src/Network/Tox/Session.hs @@ -116,10 +116,14 @@ plainHandshakeH :: SessionParams plainHandshakeH sp saddr skey handshake = do let hd = runIdentity $ handshakeData handshake prelude = show saddr ++ " --> " - dput XNetCrypto $ prelude ++ "handshake: " ++ show (otherCookie hd, baseNonce hd) + dput XNetCrypto $ unlines $ map (prelude ++) + [ "handshake: auth=" ++ show (handshakeCookie handshake) + , " : issuing=" ++ show (otherCookie hd) + , " : baseNonce=" ++ show (baseNonce hd) + ] sent <- spGetSentHandshake sp skey saddr (handshakeCookie handshake) (otherCookie hd) -- TODO: this is always returning sent = Nothing - dput XNetCrypto $ " <-- (cached) handshake baseNonce" ++ show (fmap (baseNonce . snd) sent) + dput XNetCrypto $ " <-- (cached) handshake baseNonce " ++ show (fmap (baseNonce . snd) sent) forM_ sent $ \(hd_skey,hd_sent) -> do sk <- SessionKeys (spCrypto sp) hd_skey -- cgit v1.2.3