summaryrefslogtreecommitdiff
path: root/src/Network
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index 457171a9..44b2f26f 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -681,7 +681,7 @@ createNetCryptoOutQueue sessions newsession theirSessionKey pktq ncMyPacketNonce
681addSessionToMap :: NetCryptoSessions -> SockAddr -> NetCryptoSession -> STM () 681addSessionToMap :: NetCryptoSessions -> SockAddr -> NetCryptoSession -> STM ()
682addSessionToMap sessions addrRaw netCryptoSession = do 682addSessionToMap sessions addrRaw netCryptoSession = do
683 let addr = either id id $ either4or6 addrRaw 683 let addr = either id id $ either4or6 addrRaw
684 let dmsg msg = trace msg (return ()) 684 let dmsg msg = tput XNetCrypto msg
685 dmsg $ "addSessionToMapIfNotThere sockaddr = " ++ show addr ++ ", sessionid = " ++ show (ncSessionId netCryptoSession) 685 dmsg $ "addSessionToMapIfNotThere sockaddr = " ++ show addr ++ ", sessionid = " ++ show (ncSessionId netCryptoSession)
686 let remotePublicKey = ncTheirPublicKey netCryptoSession 686 let remotePublicKey = ncTheirPublicKey netCryptoSession
687 allsessions = netCryptoSessions sessions 687 allsessions = netCryptoSessions sessions
@@ -695,7 +695,7 @@ addSessionToMap sessions addrRaw netCryptoSession = do
695addSessionToMapIfNotThere :: NetCryptoSessions -> SockAddr -> NetCryptoSession -> STM () 695addSessionToMapIfNotThere :: NetCryptoSessions -> SockAddr -> NetCryptoSession -> STM ()
696addSessionToMapIfNotThere sessions addrRaw netCryptoSession = do 696addSessionToMapIfNotThere sessions addrRaw netCryptoSession = do
697 let addr = either id id $ either4or6 addrRaw 697 let addr = either id id $ either4or6 addrRaw
698 let dmsg msg = trace msg (return ()) 698 let dmsg msg = tput XNetCrypto msg
699 dmsg $ "addSessionToMapIfNotThere sockaddr = " ++ show addr ++ ", sessionid = " ++ show (ncSessionId netCryptoSession) 699 dmsg $ "addSessionToMapIfNotThere sockaddr = " ++ show addr ++ ", sessionid = " ++ show (ncSessionId netCryptoSession)
700 let remotePublicKey = ncTheirPublicKey netCryptoSession 700 let remotePublicKey = ncTheirPublicKey netCryptoSession
701 allsessions = netCryptoSessions sessions 701 allsessions = netCryptoSessions sessions
@@ -857,7 +857,7 @@ destroySession session = do
857updateCryptoSession :: NetCryptoSessions -> SockAddr -> SecretKey -> POSIXTime -> HandshakeParams 857updateCryptoSession :: NetCryptoSessions -> SockAddr -> SecretKey -> POSIXTime -> HandshakeParams
858 -> NetCryptoSession -> Handshake Encrypted -> STM (Maybe (Handshake Encrypted), IO ()) 858 -> NetCryptoSession -> Handshake Encrypted -> STM (Maybe (Handshake Encrypted), IO ())
859updateCryptoSession sessions addr newsession timestamp hp session handshake = do 859updateCryptoSession sessions addr newsession timestamp hp session handshake = do
860 let dmsg msg = trace msg (return ()) 860 let dmsg msg = tput XNetCrypto msg
861 ncState0 <- readTVar (ncState session) 861 ncState0 <- readTVar (ncState session)
862 ncTheirBaseNonce0 <- readTVar (ncTheirBaseNonce session) 862 ncTheirBaseNonce0 <- readTVar (ncTheirBaseNonce session)
863 if (ncState0 >= {-Accepted-}InProgress AwaitingSessionPacket) 863 if (ncState0 >= {-Accepted-}InProgress AwaitingSessionPacket)