summaryrefslogtreecommitdiff
path: root/dht/src/Data/Tox/Onion.hs
diff options
context:
space:
mode:
Diffstat (limited to 'dht/src/Data/Tox/Onion.hs')
-rw-r--r--dht/src/Data/Tox/Onion.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/dht/src/Data/Tox/Onion.hs b/dht/src/Data/Tox/Onion.hs
index 258a9f73..d3c8086d 100644
--- a/dht/src/Data/Tox/Onion.hs
+++ b/dht/src/Data/Tox/Onion.hs
@@ -25,6 +25,7 @@ import Crypto.Tox hiding (encrypt,decrypt)
25import Network.Tox.NodeId 25import Network.Tox.NodeId
26import qualified Crypto.Tox as ToxCrypto 26import qualified Crypto.Tox as ToxCrypto
27import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo) 27import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo)
28import Network.Tox.TCP.NodeId (fromUDPNode)
28 29
29import Control.Applicative 30import Control.Applicative
30import Control.Arrow 31import Control.Arrow
@@ -717,7 +718,7 @@ getNodeList = do
717 (:) n <$> (getNodeList <|> pure []) 718 (:) n <$> (getNodeList <|> pure [])
718 719
719instance S.Serialize AnnounceResponse where 720instance S.Serialize AnnounceResponse where
720 get = AnnounceResponse <$> S.get <*> (SendNodes <$> getNodeList) 721 get = AnnounceResponse <$> S.get <*> (SendNodes . map fromUDPNode <$> getNodeList)
721 put (AnnounceResponse st (SendNodes ns)) = S.put st >> mapM_ S.put ns 722 put (AnnounceResponse st (SendNodes ns)) = S.put st >> mapM_ S.put ns
722 723
723data DataToRoute = DataToRoute 724data DataToRoute = DataToRoute