Don't include yourip (0.0.0.0) in i2p handshake

This commit is contained in:
Mikhail Titov 2015-07-14 12:40:03 -05:00
parent 70a99e6f62
commit 9c489e2291
1 changed files with 4 additions and 1 deletions

View File

@ -2282,7 +2282,10 @@ namespace libtorrent
std::string remote_address;
std::back_insert_iterator<std::string> out(remote_address);
detail::write_address(remote().address(), out);
handshake["yourip"] = remote_address;
#if TORRENT_USE_I2P
if (!is_i2p(*get_socket()))
#endif
handshake["yourip"] = remote_address;
handshake["reqq"] = m_settings.get_int(settings_pack::max_allowed_in_request_queue);
boost::shared_ptr<torrent> t = associated_torrent().lock();
TORRENT_ASSERT(t);