From 4c270190a5e04340f2bddb8442cd9eab42ba8bcf Mon Sep 17 00:00:00 2001 From: James Crayne Date: Wed, 15 Nov 2017 09:13:13 +0000 Subject: ncOutGoingTypeArray, outgoing is also remappable, +fix obsolete comment --- src/Network/Tox/Crypto/Handlers.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Network/Tox') 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 -- otherwise the messageType, some message types -- may not be in ncHooks yet, but they should appear -- here if ncUnrecognizedHook will add them to ncHooks - -- on an as-need basis. On 0 entries, this Transport - -- will return id in case they are handled by another Transport. + -- on an as-need basis. + , ncOutgoingTypeArray :: TVar MsgTypeArray , ncAllSessions :: NetCryptoSessions -- ^ may be needed if one net-crypto session -- needs to possibly start another, as is -- the case in group chats @@ -247,6 +247,7 @@ freshCryptoSession sessions ncHooks0 <- atomically $ newTVar (defaultHooks sessions) ncUnrecognizedHook0 <- atomically $ newTVar (defaultUnrecognizedHook sessions) ncIncomingTypeArray0 <- atomically $ newTVar (msgTypeArray sessions) + ncOutgoingTypeArray0 <- atomically $ newTVar allMsgTypes ncView0 <- atomically $ newTVar (sessionView sessions) pktq <- atomically $ PQ.new (inboundQueueCapacity sessions) 0 bufstart <- atomically $ newTVar 0 @@ -266,6 +267,7 @@ freshCryptoSession sessions , ncUnrecognizedHook = ncUnrecognizedHook0 , ncAllSessions = sessions , ncIncomingTypeArray = ncIncomingTypeArray0 + , ncOutgoingTypeArray = ncOutgoingTypeArray0 , ncView = ncView0 , ncPacketQueue = pktq , ncBufferStart = bufstart -- cgit v1.2.3