From 1bb3addc93a6989447007bc92604af81cc687ba9 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Sat, 7 Dec 2013 13:10:49 +0100 Subject: Properly encode ipv4/6 in ExtendedHandshake --- src/Network/BitTorrent/Exchange/Message.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Network/BitTorrent') 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 instance BEncode ExtendedHandshake where toBEncode ExtendedHandshake {..} = toDict $ - "ipv4" .=? ehsIPv4 -- FIXME invalid encoding - .: "ipv6" .=? ehsIPv6 -- FIXME invalid encoding + "ipv4" .=? (S.encode <$> ehsIPv4) + .: "ipv6" .=? (S.encode <$> ehsIPv6) .: "m" .=! ehsCaps .: "metadata_size" .=? ehsMetadataSize .: "p" .=? ehsPort -- cgit v1.2.3