summaryrefslogtreecommitdiff
path: root/src/Network/Tox.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/Tox.hs')
-rw-r--r--src/Network/Tox.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Network/Tox.hs b/src/Network/Tox.hs
index dfa0ea9e..aa95df81 100644
--- a/src/Network/Tox.hs
+++ b/src/Network/Tox.hs
@@ -310,7 +310,7 @@ newTox :: TVar Onion.AnnouncedKeys -- ^ Store of announced keys we are a rende
310 -> IO Tox 310 -> IO Tox
311newTox keydb addr mbSessionsState suppliedDHTKey = do 311newTox keydb addr mbSessionsState suppliedDHTKey = do
312 udp <- {- addVerbosity <$> -} udpTransport addr 312 udp <- {- addVerbosity <$> -} udpTransport addr
313 (crypto0,sessionsState) <- case mbSessionsState of 313 (crypto0,sessionsState0) <- case mbSessionsState of
314 Nothing -> do 314 Nothing -> do
315 crypto <- newCrypto 315 crypto <- newCrypto
316 sessionsState <- newSessionsState crypto defaultUnRecHook defaultCryptoDataHooks 316 sessionsState <- newSessionsState crypto defaultUnRecHook defaultCryptoDataHooks
@@ -335,6 +335,7 @@ newTox keydb addr mbSessionsState suppliedDHTKey = do
335 let ignoreErrors _ = return () -- Set this to (hPutStrLn stderr) to debug onion route building. 335 let ignoreErrors _ = return () -- Set this to (hPutStrLn stderr) to debug onion route building.
336 orouter <- newOnionRouter ignoreErrors 336 orouter <- newOnionRouter ignoreErrors
337 (dhtcrypt,onioncrypt,dtacrypt,cryptonet) <- toxTransport crypto orouter lookupClose udp 337 (dhtcrypt,onioncrypt,dtacrypt,cryptonet) <- toxTransport crypto orouter lookupClose udp
338 let sessionsState = sessionsState0 { sessionTransport = cryptonet }
338 let dhtnet0 = layerTransportM (DHT.decrypt crypto) (DHT.encrypt crypto) dhtcrypt 339 let dhtnet0 = layerTransportM (DHT.decrypt crypto) (DHT.encrypt crypto) dhtcrypt
339 tbl4 = DHT.routing4 $ mkrouting (error "missing client") 340 tbl4 = DHT.routing4 $ mkrouting (error "missing client")
340 tbl6 = DHT.routing6 $ mkrouting (error "missing client") 341 tbl6 = DHT.routing6 $ mkrouting (error "missing client")