summaryrefslogtreecommitdiff
path: root/dht/src/Network/Tox/Onion/Handlers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/src/Network/Tox/Onion/Handlers.hs')
-rw-r--r--dht/src/Network/Tox/Onion/Handlers.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/dht/src/Network/Tox/Onion/Handlers.hs b/dht/src/Network/Tox/Onion/Handlers.hs
index b35631a3..52dcf536 100644
--- a/dht/src/Network/Tox/Onion/Handlers.hs
+++ b/dht/src/Network/Tox/Onion/Handlers.hs
@@ -4,6 +4,7 @@
4module Network.Tox.Onion.Handlers where 4module Network.Tox.Onion.Handlers where
5 5
6import Network.Kademlia.Search 6import Network.Kademlia.Search
7import Network.Tox.TCP.NodeId (udpNodeInfo)
7import Network.Tox.DHT.Transport 8import Network.Tox.DHT.Transport
8import Network.Tox.DHT.Handlers hiding (Message,Client) 9import Network.Tox.DHT.Handlers hiding (Message,Client)
9import Network.Tox.Onion.Transport 10import Network.Tox.Onion.Transport
@@ -251,7 +252,7 @@ announceSerializer getTimeout = MethodSerializer
251 } 252 }
252 253
253unwrapAnnounceResponse :: Maybe NodeId -> NodeInfo -> AnnounceResponse -> ([NodeInfo], [Rendezvous], Maybe Nonce32) 254unwrapAnnounceResponse :: Maybe NodeId -> NodeInfo -> AnnounceResponse -> ([NodeInfo], [Rendezvous], Maybe Nonce32)
254unwrapAnnounceResponse alias ni (AnnounceResponse is_stored (SendNodes ns)) 255unwrapAnnounceResponse alias ni (AnnounceResponse is_stored (SendNodes ns0)) | let ns = map udpNodeInfo ns0
255 = case is_stored of 256 = case is_stored of
256 NotStored n32 -> ( ns , [] , Just n32) 257 NotStored n32 -> ( ns , [] , Just n32)
257 SendBackKey k -> ( ns , [Rendezvous k ni] , Nothing ) 258 SendBackKey k -> ( ns , [Rendezvous k ni] , Nothing )