diff options
Diffstat (limited to 'dht/src/Data/Tox/Onion.hs')
-rw-r--r-- | dht/src/Data/Tox/Onion.hs | 3 |
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) | |||
25 | import Network.Tox.NodeId | 25 | import Network.Tox.NodeId |
26 | import qualified Crypto.Tox as ToxCrypto | 26 | import qualified Crypto.Tox as ToxCrypto |
27 | import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo) | 27 | import Network.Tox.DHT.Transport (NodeInfo(..),NodeId(..),SendNodes(..),nodeInfo,DHTPublicKey(..),FriendRequest,asymNodeInfo) |
28 | import Network.Tox.TCP.NodeId (fromUDPNode) | ||
28 | 29 | ||
29 | import Control.Applicative | 30 | import Control.Applicative |
30 | import Control.Arrow | 31 | import Control.Arrow |
@@ -717,7 +718,7 @@ getNodeList = do | |||
717 | (:) n <$> (getNodeList <|> pure []) | 718 | (:) n <$> (getNodeList <|> pure []) |
718 | 719 | ||
719 | instance S.Serialize AnnounceResponse where | 720 | instance 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 | ||
723 | data DataToRoute = DataToRoute | 724 | data DataToRoute = DataToRoute |