avoid self-assignment of tcp::endpoint (causes a memcpy with overlapping ranges)

This commit is contained in:
Arvid Norberg 2010-12-25 09:13:50 +00:00
parent b078cd5416
commit dc9af94ee1
2 changed files with 2 additions and 2 deletions

View File

@ -617,7 +617,7 @@ namespace libtorrent
void on_name_lookup(error_code const& e, tcp::resolver::iterator i
, std::list<web_seed_entry>::iterator url, tcp::endpoint proxy);
void connect_web_seed(std::list<web_seed_entry>::iterator web, tcp::endpoint const& a);
void connect_web_seed(std::list<web_seed_entry>::iterator web, tcp::endpoint a);
// this is the asio callback that is called when a name
// lookup for a proxy for a web seed is completed.

View File

@ -3669,7 +3669,7 @@ namespace libtorrent
connect_web_seed(web, a);
}
void torrent::connect_web_seed(std::list<web_seed_entry>::iterator web, tcp::endpoint const& a)
void torrent::connect_web_seed(std::list<web_seed_entry>::iterator web, tcp::endpoint a)
{
TORRENT_ASSERT(m_ses.is_network_thread());
if (m_ses.m_ip_filter.access(a.address()) & ip_filter::blocked)