summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Live user <user@localhost.localdomain>2017-10-28 22:17:23 +0000
committerDebian Live user <user@localhost.localdomain>2017-10-28 22:17:23 +0000
commit11ee6ebec8116d2ddd72e1a4d3d6d412f22597b7 (patch)
tree94dcf32f149a865ecf138adde8bf8ddbfc2d16a3
parent17676f8b5df3beadc231adaf208ffc5ac8f833f3 (diff)
localUserKey parameter on cookieRequest
-rw-r--r--src/Network/Tox/DHT/Handlers.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Network/Tox/DHT/Handlers.hs b/src/Network/Tox/DHT/Handlers.hs
index 38763f9c..60c0500c 100644
--- a/src/Network/Tox/DHT/Handlers.hs
+++ b/src/Network/Tox/DHT/Handlers.hs
@@ -243,8 +243,8 @@ ping client addr = do
243 hPutStrLn stderr $ show addr ++ " -pong-> " ++ show reply 243 hPutStrLn stderr $ show addr ++ " -pong-> " ++ show reply
244 maybe (return False) (\Pong -> return True) $ join reply 244 maybe (return False) (\Pong -> return True) $ join reply
245 245
246cookieRequest :: TransportCrypto -> Client -> NodeInfo -> IO (Maybe Cookie) 246cookieRequest :: TransportCrypto -> Client -> PublicKey -> NodeInfo -> IO (Maybe Cookie)
247cookieRequest crypto client addr = do 247cookieRequest crypto client localUserKey addr = do
248 let sockAddr = nodeAddr addr 248 let sockAddr = nodeAddr addr
249 nid = id2key $ nodeId addr 249 nid = id2key $ nodeId addr
250 let incAddr sockMap 250 let incAddr sockMap
@@ -271,7 +271,7 @@ cookieRequest crypto client addr = do
271 , wrapQuery = \tid src dst cr -> DHTCookieRequest $ wrapAsymm tid src dst (, cr) 271 , wrapQuery = \tid src dst cr -> DHTCookieRequest $ wrapAsymm tid src dst (, cr)
272 , unwrapResponse = fmap snd . unCookie 272 , unwrapResponse = fmap snd . unCookie
273 } 273 }
274 cookieRequest = CookieRequest (transportPublic crypto) 274 cookieRequest = CookieRequest localUserKey
275 hPutStrLn stderr $ show addr ++ " <-- cookieRequest" 275 hPutStrLn stderr $ show addr ++ " <-- cookieRequest"
276 reply <- QR.sendQuery client cookieSerializer cookieRequest addr 276 reply <- QR.sendQuery client cookieSerializer cookieRequest addr
277 hPutStrLn stderr $ show addr ++ " -cookieResponse-> " ++ show reply 277 hPutStrLn stderr $ show addr ++ " -cookieResponse-> " ++ show reply