diff options
Diffstat (limited to 'src/Network/Tox/Crypto')
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 9d1da606..1911eccf 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -82,8 +82,8 @@ data NetCryptoSession = NCrypto { ncState :: TVar NetCryptoSessionStatu | |||
82 | -- otherwise the messageType, some message types | 82 | -- otherwise the messageType, some message types |
83 | -- may not be in ncHooks yet, but they should appear | 83 | -- may not be in ncHooks yet, but they should appear |
84 | -- here if ncUnrecognizedHook will add them to ncHooks | 84 | -- here if ncUnrecognizedHook will add them to ncHooks |
85 | -- on an as-need basis. On 0 entries, this Transport | 85 | -- on an as-need basis. |
86 | -- will return id in case they are handled by another Transport. | 86 | , ncOutgoingTypeArray :: TVar MsgTypeArray |
87 | , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session | 87 | , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session |
88 | -- needs to possibly start another, as is | 88 | -- needs to possibly start another, as is |
89 | -- the case in group chats | 89 | -- the case in group chats |
@@ -247,6 +247,7 @@ freshCryptoSession sessions | |||
247 | ncHooks0 <- atomically $ newTVar (defaultHooks sessions) | 247 | ncHooks0 <- atomically $ newTVar (defaultHooks sessions) |
248 | ncUnrecognizedHook0 <- atomically $ newTVar (defaultUnrecognizedHook sessions) | 248 | ncUnrecognizedHook0 <- atomically $ newTVar (defaultUnrecognizedHook sessions) |
249 | ncIncomingTypeArray0 <- atomically $ newTVar (msgTypeArray sessions) | 249 | ncIncomingTypeArray0 <- atomically $ newTVar (msgTypeArray sessions) |
250 | ncOutgoingTypeArray0 <- atomically $ newTVar allMsgTypes | ||
250 | ncView0 <- atomically $ newTVar (sessionView sessions) | 251 | ncView0 <- atomically $ newTVar (sessionView sessions) |
251 | pktq <- atomically $ PQ.new (inboundQueueCapacity sessions) 0 | 252 | pktq <- atomically $ PQ.new (inboundQueueCapacity sessions) 0 |
252 | bufstart <- atomically $ newTVar 0 | 253 | bufstart <- atomically $ newTVar 0 |
@@ -266,6 +267,7 @@ freshCryptoSession sessions | |||
266 | , ncUnrecognizedHook = ncUnrecognizedHook0 | 267 | , ncUnrecognizedHook = ncUnrecognizedHook0 |
267 | , ncAllSessions = sessions | 268 | , ncAllSessions = sessions |
268 | , ncIncomingTypeArray = ncIncomingTypeArray0 | 269 | , ncIncomingTypeArray = ncIncomingTypeArray0 |
270 | , ncOutgoingTypeArray = ncOutgoingTypeArray0 | ||
269 | , ncView = ncView0 | 271 | , ncView = ncView0 |
270 | , ncPacketQueue = pktq | 272 | , ncPacketQueue = pktq |
271 | , ncBufferStart = bufstart | 273 | , ncBufferStart = bufstart |