another try to fix the upnp problems
This commit is contained in:
parent
db165942a7
commit
fb6130bd95
12
src/upnp.cpp
12
src/upnp.cpp
|
@ -247,6 +247,8 @@ void upnp::resend_request(error_code const& e)
|
|||
{
|
||||
if (e) return;
|
||||
|
||||
boost::intrusive_ptr<upnp> me(self());
|
||||
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
if (m_closing) return;
|
||||
|
@ -303,6 +305,8 @@ void upnp::resend_request(error_code const& e)
|
|||
void upnp::on_reply(udp::endpoint const& from, char* buffer
|
||||
, std::size_t bytes_transferred)
|
||||
{
|
||||
boost::intrusive_ptr<upnp> me(self());
|
||||
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
using namespace libtorrent::detail;
|
||||
|
@ -653,6 +657,8 @@ void upnp::update_map(rootdevice& d, int i, mutex_t::scoped_lock& l)
|
|||
|
||||
if (d.upnp_connection) return;
|
||||
|
||||
boost::intrusive_ptr<upnp> me(self());
|
||||
|
||||
mapping_t& m = d.mapping[i];
|
||||
|
||||
if (m.action == mapping_t::action_none
|
||||
|
@ -825,6 +831,8 @@ void upnp::on_upnp_xml(error_code const& e
|
|||
, libtorrent::http_parser const& p, rootdevice& d
|
||||
, http_connection& c)
|
||||
{
|
||||
boost::intrusive_ptr<upnp> me(self());
|
||||
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
TORRENT_ASSERT(d.magic == 1337);
|
||||
|
@ -1056,6 +1064,8 @@ void upnp::on_upnp_map_response(error_code const& e
|
|||
, libtorrent::http_parser const& p, rootdevice& d, int mapping
|
||||
, http_connection& c)
|
||||
{
|
||||
boost::intrusive_ptr<upnp> me(self());
|
||||
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
TORRENT_ASSERT(d.magic == 1337);
|
||||
|
@ -1212,6 +1222,8 @@ void upnp::on_upnp_unmap_response(error_code const& e
|
|||
, libtorrent::http_parser const& p, rootdevice& d, int mapping
|
||||
, http_connection& c)
|
||||
{
|
||||
boost::intrusive_ptr<upnp> me(self());
|
||||
|
||||
mutex_t::scoped_lock l(m_mutex);
|
||||
|
||||
TORRENT_ASSERT(d.magic == 1337);
|
||||
|
|
Loading…
Reference in New Issue