diff options
Diffstat (limited to 'dht/src/Network/Tox/Onion/Handlers.hs')
-rw-r--r-- | dht/src/Network/Tox/Onion/Handlers.hs | 3 |
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 @@ | |||
4 | module Network.Tox.Onion.Handlers where | 4 | module Network.Tox.Onion.Handlers where |
5 | 5 | ||
6 | import Network.Kademlia.Search | 6 | import Network.Kademlia.Search |
7 | import Network.Tox.TCP.NodeId (udpNodeInfo) | ||
7 | import Network.Tox.DHT.Transport | 8 | import Network.Tox.DHT.Transport |
8 | import Network.Tox.DHT.Handlers hiding (Message,Client) | 9 | import Network.Tox.DHT.Handlers hiding (Message,Client) |
9 | import Network.Tox.Onion.Transport | 10 | import Network.Tox.Onion.Transport |
@@ -251,7 +252,7 @@ announceSerializer getTimeout = MethodSerializer | |||
251 | } | 252 | } |
252 | 253 | ||
253 | unwrapAnnounceResponse :: Maybe NodeId -> NodeInfo -> AnnounceResponse -> ([NodeInfo], [Rendezvous], Maybe Nonce32) | 254 | unwrapAnnounceResponse :: Maybe NodeId -> NodeInfo -> AnnounceResponse -> ([NodeInfo], [Rendezvous], Maybe Nonce32) |
254 | unwrapAnnounceResponse alias ni (AnnounceResponse is_stored (SendNodes ns)) | 255 | unwrapAnnounceResponse 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 ) |