From bc1c976e9175b4ac13430ba9c23ea8b099401e9e Mon Sep 17 00:00:00 2001 From: Sam T Date: Tue, 16 Jul 2013 20:40:05 +0400 Subject: ~ Fix some long standing warnings. --- src/Network/BitTorrent/DHT/Protocol.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/Network/BitTorrent/DHT') diff --git a/src/Network/BitTorrent/DHT/Protocol.hs b/src/Network/BitTorrent/DHT/Protocol.hs index 5267a916..5cc1722d 100644 --- a/src/Network/BitTorrent/DHT/Protocol.hs +++ b/src/Network/BitTorrent/DHT/Protocol.hs @@ -36,6 +36,7 @@ import Remote.KRPC.Protocol import Data.BEncode import Data.Torrent import Network.BitTorrent.Peer +import Network.BitTorrent.Exchange.Protocol () {----------------------------------------------------------------------- Node @@ -50,11 +51,6 @@ type NodeId = ByteString genNodeId :: IO NodeId genNodeId = getEntropy 20 -instance Serialize PortNumber where - get = fromIntegral <$> getWord16be - put = putWord16be . fromIntegral - - data NodeAddr = NodeAddr { nodeIP :: {-# UNPACK #-} !HostAddress , nodePort :: {-# UNPACK #-} !PortNumber @@ -66,7 +62,6 @@ instance Serialize NodeAddr where putWord32be nodeIP put nodePort - data NodeInfo = NodeInfo { nodeID :: !NodeId , nodeAddr :: !NodeAddr @@ -175,7 +170,7 @@ assignToken _ _ = return "" -- TODO checkToken :: NodeId -> Token -> NodeSession -> IO Bool -checkToken nid token _ = return True +checkToken _ _ _ = return True updateTimestamp :: NodeSession -> NodeId -> IO () updateTimestamp = error "updateTimestamp" -- cgit v1.2.3