diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-08-03 11:44:24 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-08-03 11:44:24 +0000 |
| commit | 2bd5020f81bc8c9995590209d0bf024147c8a51a (patch) | |
| tree | 3cc93c71179570c7a4889a25f64f56d3c8820c84 /src/DHTRoutingTableDeserializer.cc | |
| parent | 939a372727b2f27e683a23ac38928b82de550376 (diff) | |
2010-08-03 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added bittorrent::packcompact() which replaces
bittorrent::createcompact() and supports IPv6 addresses. Rewritten
bittorrent::unpackcompact() and bittorrent::extractPeer() to
support IPv6 addresses. Fixed added.f flags in ut_pex.
* src/BtConstants.h
* src/DHTFindNodeReplyMessage.cc
* src/DHTGetPeersReplyMessage.cc
* src/DHTMessageFactoryImpl.cc
* src/DHTRoutingTableDeserializer.cc
* src/DHTRoutingTableSerializer.cc
* src/DHTTokenTracker.cc
* src/DefaultBtAnnounce.cc
* src/UTPexExtensionMessage.cc
* src/bittorrent_helper.cc
* src/bittorrent_helper.h
* test/BittorrentHelperTest.cc
* test/DHTFindNodeReplyMessageTest.cc
* test/DHTGetPeersReplyMessageTest.cc
* test/DHTMessageFactoryImplTest.cc
* test/DHTRoutingTableSerializerTest.cc
* test/DefaultExtensionMessageFactoryTest.cc
* test/UTPexExtensionMessageTest.cc
Diffstat (limited to 'src/DHTRoutingTableDeserializer.cc')
| -rw-r--r-- | src/DHTRoutingTableDeserializer.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/DHTRoutingTableDeserializer.cc b/src/DHTRoutingTableDeserializer.cc index df43c5c5..bed629ca 100644 --- a/src/DHTRoutingTableDeserializer.cc +++ b/src/DHTRoutingTableDeserializer.cc @@ -182,7 +182,9 @@ void DHTRoutingTableDeserializer::deserialize(std::istream& in) CHECK_STREAM(in, 42); continue; } - std::pair<std::string, uint16_t> peer = bittorrent::unpackcompact(buf); + // TODO DHT6 protocol family should be configurable. + std::pair<std::string, uint16_t> peer = + bittorrent::unpackcompact(buf, AF_INET); if(peer.first.empty()) { // skip this entry readBytes(buf, buf.size(), in, 42); |
