diff options
author | James Crayne <jim.crayne@gmail.com> | 2017-10-31 19:41:13 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2017-10-31 19:41:13 +0000 |
commit | 1914912b1fb1163987eee378a03324b71aaf0581 (patch) | |
tree | 6991e770139988b73f7cba2b332e27d281b9339a /src | |
parent | 7fe3c9e04ecd7aec962bcc83bc4cf5139cf732f0 (diff) |
change name: defaultCryptoDataHooks
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/Tox.hs | 4 | ||||
-rw-r--r-- | src/Network/Tox/Crypto/Handlers.hs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs index 2f778874..70962844 100644 --- a/src/Network/Tox.hs +++ b/src/Network/Tox.hs | |||
@@ -89,7 +89,7 @@ import Crypto.Tox | |||
89 | import Data.Word64Map (fitsInInt) | 89 | import Data.Word64Map (fitsInInt) |
90 | import qualified Data.Word64Map (empty) | 90 | import qualified Data.Word64Map (empty) |
91 | import Network.Tox.Crypto.Transport (NetCrypto) | 91 | import Network.Tox.Crypto.Transport (NetCrypto) |
92 | import Network.Tox.Crypto.Handlers (newSessionsState, cryptoNetHandler, cryptoDefaultHooks) | 92 | import Network.Tox.Crypto.Handlers (newSessionsState, cryptoNetHandler, defaultCryptoDataHooks) |
93 | import qualified Network.Tox.DHT.Handlers as DHT | 93 | import qualified Network.Tox.DHT.Handlers as DHT |
94 | import qualified Network.Tox.DHT.Transport as DHT | 94 | import qualified Network.Tox.DHT.Transport as DHT |
95 | import Network.Tox.NodeId | 95 | import Network.Tox.NodeId |
@@ -309,7 +309,7 @@ newTox keydb addr = do | |||
309 | (const id) | 309 | (const id) |
310 | 310 | ||
311 | roster <- newRoster | 311 | roster <- newRoster |
312 | sessionsState <- newSessionsState crypto cryptoDefaultHooks | 312 | sessionsState <- newSessionsState crypto defaultCryptoDataHooks |
313 | return Tox | 313 | return Tox |
314 | { toxDHT = dhtclient | 314 | { toxDHT = dhtclient |
315 | , toxOnion = onionclient | 315 | , toxOnion = onionclient |
diff --git a/src/Network/Tox/Crypto/Handlers.hs b/src/Network/Tox/Crypto/Handlers.hs index 8a45ba64..29376e63 100644 --- a/src/Network/Tox/Crypto/Handlers.hs +++ b/src/Network/Tox/Crypto/Handlers.hs | |||
@@ -202,5 +202,5 @@ cryptoNetHandler sessions addr (NetCrypto (CryptoPacket nonce16 encrypted)) = do | |||
202 | _ -> error "unreachable-last2Bytes" | 202 | _ -> error "unreachable-last2Bytes" |
203 | dATA_NUM_THRESHOLD = 21845 -- = 65535 / 3 | 203 | dATA_NUM_THRESHOLD = 21845 -- = 65535 / 3 |
204 | 204 | ||
205 | cryptoDefaultHooks :: Map.Map MessageType [NetCryptoHook] | 205 | defaultCryptoDataHooks :: Map.Map MessageType [NetCryptoHook] |
206 | cryptoDefaultHooks = Map.empty | 206 | defaultCryptoDataHooks = Map.empty |