summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto/Handlers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox/Crypto/Handlers.hs')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index 1aaee998..b7414095 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -613,7 +613,8 @@ createNetCryptoOutQueue sessions newsession theirSessionKey pktq ncMyPacketNonce
613 613
614-- | add this session to the lookup maps, overwrite if its already in them 614-- | add this session to the lookup maps, overwrite if its already in them
615addSessionToMapIfNotThere :: NetCryptoSessions -> SockAddr -> NetCryptoSession -> STM () 615addSessionToMapIfNotThere :: NetCryptoSessions -> SockAddr -> NetCryptoSession -> STM ()
616addSessionToMapIfNotThere sessions addr netCryptoSession = do 616addSessionToMapIfNotThere sessions addrRaw netCryptoSession = do
617 let addr = either id id $ either4or6 addrRaw
617 let dmsg msg = trace msg (return ()) 618 let dmsg msg = trace msg (return ())
618 dmsg $ "addSessionToMapIfNotThere sockaddr = " ++ show addr ++ ", sessionid = " ++ show (ncSessionId netCryptoSession) 619 dmsg $ "addSessionToMapIfNotThere sockaddr = " ++ show addr ++ ", sessionid = " ++ show (ncSessionId netCryptoSession)
619 let remotePublicKey = ncTheirPublicKey netCryptoSession 620 let remotePublicKey = ncTheirPublicKey netCryptoSession
@@ -788,7 +789,8 @@ toHandshakeParams (key,hs)
788 } 789 }
789 790
790handshakeH :: NetCryptoSessions -> SockAddr -> Handshake Encrypted -> IO (Maybe a) 791handshakeH :: NetCryptoSessions -> SockAddr -> Handshake Encrypted -> IO (Maybe a)
791handshakeH sessions addr hshake@(Handshake (Cookie n24 ecookie) nonce24 encrypted) = do 792handshakeH sessions addrRaw hshake@(Handshake (Cookie n24 ecookie) nonce24 encrypted) = do
793 let addr = either id id $ either4or6 addrRaw
792 dput XNetCrypto ("RECIEVED HANDSHAKE from " ++ show addr) 794 dput XNetCrypto ("RECIEVED HANDSHAKE from " ++ show addr)
793 -- Handle Handshake Message 795 -- Handle Handshake Message
794 let crypto = transportCrypto sessions :: TransportCrypto 796 let crypto = transportCrypto sessions :: TransportCrypto