Combinatorrent 0.3.0 → 0.3.1
raw patch · 3 files changed
+5/−3 lines, 3 files
Files
- Combinatorrent.cabal +1/−1
- src/Process/Peer/Sender.hs +1/−1
- src/Protocol/Wire.hs +3/−1
Combinatorrent.cabal view
@@ -1,6 +1,6 @@ name: Combinatorrent category: Network-version: 0.3.0+version: 0.3.1 category: Network description: Combinatorrent provides a BitTorrent client, based on STM for concurrency. This is an early preview release which is capable of
src/Process/Peer/Sender.hs view
@@ -36,6 +36,6 @@ s <- asks sock _ <- liftIO $ do r <- atomically $ takeTMVar ch- send s r+ sendAll s r pgm
src/Protocol/Wire.hs view
@@ -336,7 +336,9 @@ constructBitField :: Int -> [PieceNum] -> B.ByteString constructBitField sz pieces = B.pack . build $ m where m = map (`elem` pieces) [0..sz-1 + pad]- pad = 8 - (sz `mod` 8)+ pad = case sz `mod` 8 of+ 0 -> 0+ n -> 8 - n build [] = [] build l = let (first, rest) = splitAt 8 l in if length first /= 8