summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bittorrent.cabal2
-rw-r--r--src/Network/BitTorrent/Core/Node.hs2
-rw-r--r--src/Network/BitTorrent/Core/PeerId.hs4
m---------sub/bencoding0
4 files changed, 4 insertions, 4 deletions
diff --git a/bittorrent.cabal b/bittorrent.cabal
index 0d4005a9..0208f0c2 100644
--- a/bittorrent.cabal
+++ b/bittorrent.cabal
@@ -128,7 +128,7 @@ library
128 , base16-bytestring >= 0.1 128 , base16-bytestring >= 0.1
129 , base32-bytestring >= 0.2 129 , base32-bytestring >= 0.2
130 , base64-bytestring >= 1.0 130 , base64-bytestring >= 1.0
131 , bencoding >= 0.4.2.1 131 , bencoding >= 0.4.3
132 , cereal >= 0.3.5 132 , cereal >= 0.3.5
133 133
134 -- Time 134 -- Time
diff --git a/src/Network/BitTorrent/Core/Node.hs b/src/Network/BitTorrent/Core/Node.hs
index c629df08..a1a87135 100644
--- a/src/Network/BitTorrent/Core/Node.hs
+++ b/src/Network/BitTorrent/Core/Node.hs
@@ -37,7 +37,7 @@ import Network.BitTorrent.Core.PeerAddr ()
37-- | Normally, /this/ node id should we saved between invocations of 37-- | Normally, /this/ node id should we saved between invocations of
38-- the client software. 38-- the client software.
39newtype NodeId = NodeId ByteString 39newtype NodeId = NodeId ByteString
40 deriving (Show, Eq, Ord, FromJSON, ToJSON) 40 deriving (Show, Eq, Ord, BEncode, FromJSON, ToJSON)
41 41
42nodeIdSize :: Int 42nodeIdSize :: Int
43nodeIdSize = 20 43nodeIdSize = 20
diff --git a/src/Network/BitTorrent/Core/PeerId.hs b/src/Network/BitTorrent/Core/PeerId.hs
index f30308d4..cab30331 100644
--- a/src/Network/BitTorrent/Core/PeerId.hs
+++ b/src/Network/BitTorrent/Core/PeerId.hs
@@ -305,7 +305,7 @@ fingerprint pid = either (const def) id $ runGet getCI (getPeerId pid)
305 'e' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion 305 'e' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion
306 'F' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion 306 'F' -> Fingerprint <$> getBitCometImpl <*> getBitCometVersion
307 c -> do 307 c -> do
308 c1 <- w2c <$> lookAhead getWord8 308 c1 <- w2c <$> S.lookAhead getWord8
309 if c1 == 'P' 309 if c1 == 'P'
310 then do 310 then do
311 _ <- getWord8 311 _ <- getWord8
@@ -324,7 +324,7 @@ fingerprint pid = either (const def) id $ runGet getCI (getPeerId pid)
324 324
325 getBitCometImpl = do 325 getBitCometImpl = do
326 bs <- getByteString 3 326 bs <- getByteString 3
327 lookAhead $ do 327 S.lookAhead $ do
328 _ <- getByteString 2 328 _ <- getByteString 2
329 lr <- getByteString 4 329 lr <- getByteString 4
330 return $ 330 return $
diff --git a/sub/bencoding b/sub/bencoding
Subproject d80b4fbe1ffe8478a1c72b1e96bbc5b44991d96 Subproject 7244b867ebafb7e7b03fd21f84ea11dd2846ff4