diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2013-12-07 13:10:49 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2013-12-14 19:42:21 +0100 |
commit | 1bb3addc93a6989447007bc92604af81cc687ba9 (patch) | |
tree | 7853c36cb7c1201c105044c502f5fca008679eea /src/Network/BitTorrent/Exchange | |
parent | 39b3fd7d872153e1eafff38565b1df5d19adbe75 (diff) |
Properly encode ipv4/6 in ExtendedHandshake
Diffstat (limited to 'src/Network/BitTorrent/Exchange')
-rw-r--r-- | src/Network/BitTorrent/Exchange/Message.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/BitTorrent/Exchange/Message.hs b/src/Network/BitTorrent/Exchange/Message.hs index 0adb8299..fb3a5c82 100644 --- a/src/Network/BitTorrent/Exchange/Message.hs +++ b/src/Network/BitTorrent/Exchange/Message.hs | |||
@@ -678,8 +678,8 @@ instance Default ExtendedHandshake where | |||
678 | 678 | ||
679 | instance BEncode ExtendedHandshake where | 679 | instance BEncode ExtendedHandshake where |
680 | toBEncode ExtendedHandshake {..} = toDict $ | 680 | toBEncode ExtendedHandshake {..} = toDict $ |
681 | "ipv4" .=? ehsIPv4 -- FIXME invalid encoding | 681 | "ipv4" .=? (S.encode <$> ehsIPv4) |
682 | .: "ipv6" .=? ehsIPv6 -- FIXME invalid encoding | 682 | .: "ipv6" .=? (S.encode <$> ehsIPv6) |
683 | .: "m" .=! ehsCaps | 683 | .: "m" .=! ehsCaps |
684 | .: "metadata_size" .=? ehsMetadataSize | 684 | .: "metadata_size" .=? ehsMetadataSize |
685 | .: "p" .=? ehsPort | 685 | .: "p" .=? ehsPort |