fixed upnp bug when connecting without network

This commit is contained in:
Arvid Norberg 2007-12-24 08:18:53 +00:00
parent 4b7eaf8cbe
commit d5748419c1
3 changed files with 2 additions and 2 deletions

View File

@ -75,6 +75,7 @@ public:
// it will not be mapped
void set_mappings(int tcp, int udp);
void discover_device();
void close();
std::string router_model() { return m_model; }
@ -91,7 +92,6 @@ private:
void resend_request(asio::error_code const& e);
void on_reply(udp::endpoint const& from, char* buffer
, std::size_t bytes_transferred);
void discover_device();
struct rootdevice;

View File

@ -2349,6 +2349,7 @@ namespace detail
, bind(&session_impl::on_port_mapping
, this, _1, _2, _3));
m_upnp->discover_device();
m_upnp->set_mappings(m_listen_interface.port(),
#ifndef TORRENT_DISABLE_DHT
m_dht ? m_dht_settings.service_port :

View File

@ -81,7 +81,6 @@ upnp::upnp(io_service& ios, connection_queue& cc
m_log.open("upnp.log", std::ios::in | std::ios::out | std::ios::trunc);
#endif
m_retry_count = 0;
discover_device();
}
upnp::~upnp()