listen port cleanup

This commit is contained in:
Arvid Norberg 2009-01-19 08:31:31 +00:00
parent dceb879f50
commit 8aa43b682b
2 changed files with 3 additions and 4 deletions

View File

@ -2056,7 +2056,7 @@ namespace aux {
{
mutex_t::scoped_lock l(m_mutex);
if (m_listen_sockets.empty()) return 0;
return m_listen_sockets.front().external_port;;
return m_listen_sockets.front().external_port;
}
void session_impl::announce_lsd(sha1_hash const& ih)

View File

@ -1013,7 +1013,7 @@ namespace libtorrent
{
m_last_dht_announce = now;
m_ses.m_dht->announce(m_torrent_file->info_hash()
, m_ses.m_listen_sockets.front().external_port
, m_ses.listen_port()
, bind(&torrent::on_dht_announce_response_disp, self, _1));
}
#endif
@ -1070,8 +1070,7 @@ namespace libtorrent
req.num_want = (req.event == tracker_request::stopped)
?0:m_settings.num_want;
req.listen_port = m_ses.m_listen_sockets.empty()
?0:m_ses.m_listen_sockets.front().external_port;
req.listen_port = m_ses.listen_port();
req.key = m_ses.m_key;
ptime now = time_now();