summaryrefslogtreecommitdiff
path: root/src/Network/Tox/Crypto/Handlers.hs
diff options
context:
space:
mode:
authorJames Crayne <jim.crayne@gmail.com>2017-11-01 02:14:17 +0000
committerJames Crayne <jim.crayne@gmail.com>2017-11-01 02:14:17 +0000
commit03d30d155a9f932a2b282d126ffcecd394be46f9 (patch)
treec7dba78af0ce55c2c1ad9ff72bbad42f72b0d62e /src/Network/Tox/Crypto/Handlers.hs
parent28446467cb14a881b1d8aba9c17d5433a6d8844b (diff)
missing ncGroups initialization
Diffstat (limited to 'src/Network/Tox/Crypto/Handlers.hs')
-rw-r--r--src/Network/Tox/Crypto/Handlers.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs
index 8a0e3fd9..34d2d87e 100644
--- a/src/Network/Tox/Crypto/Handlers.hs
+++ b/src/Network/Tox/Crypto/Handlers.hs
@@ -139,6 +139,7 @@ cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) non
139 newsession <- generateSecretKey 139 newsession <- generateSecretKey
140 ncHooks0 <- atomically $ newTVar (defaultHooks sessions) 140 ncHooks0 <- atomically $ newTVar (defaultHooks sessions)
141 ncUnrecognizedHook0 <- atomically $ newTVar (defaultUnrecognizedHook sessions) 141 ncUnrecognizedHook0 <- atomically $ newTVar (defaultUnrecognizedHook sessions)
142 ncGroups0 <- atomically $ newTVar (Map.empty)
142 let netCryptoSession = 143 let netCryptoSession =
143 NCrypto { ncState = ncState0 144 NCrypto { ncState = ncState0
144 , ncTheirBaseNonce= ncTheirBaseNonce0 145 , ncTheirBaseNonce= ncTheirBaseNonce0
@@ -151,6 +152,7 @@ cryptoNetHandler sessions addr (NetHandshake (Handshake (Cookie n24 ecookie) non
151 , ncHooks = ncHooks0 152 , ncHooks = ncHooks0
152 , ncUnrecognizedHook = ncUnrecognizedHook0 153 , ncUnrecognizedHook = ncUnrecognizedHook0
153 , ncAllSessions = sessions 154 , ncAllSessions = sessions
155 , ncGroups = ncGroups0
154 } 156 }
155 atomically $ modifyTVar allsessions (Map.insert addr netCryptoSession) 157 atomically $ modifyTVar allsessions (Map.insert addr netCryptoSession)
156 return Nothing 158 return Nothing