forked from premiere/premiere-libtorrent
fixed deadlock in natpmp implementation
This commit is contained in:
parent
a1c37d4796
commit
6de02f9895
|
@ -72,6 +72,10 @@
|
||||||
* improved support for sparse files on windows
|
* improved support for sparse files on windows
|
||||||
* added ability to give seeding torrents preference to active slots
|
* added ability to give seeding torrents preference to active slots
|
||||||
|
|
||||||
|
release 0.14.7
|
||||||
|
|
||||||
|
* fixed deadlock in natpmp
|
||||||
|
|
||||||
release 0.14.6
|
release 0.14.6
|
||||||
|
|
||||||
* various missing include fixes to be buildable with boost 1.40
|
* various missing include fixes to be buildable with boost 1.40
|
||||||
|
|
|
@ -80,6 +80,7 @@ private:
|
||||||
void try_next_mapping(int i, mutex_t::scoped_lock& l);
|
void try_next_mapping(int i, mutex_t::scoped_lock& l);
|
||||||
void update_expiration_timer();
|
void update_expiration_timer();
|
||||||
void mapping_expired(error_code const& e, int i);
|
void mapping_expired(error_code const& e, int i);
|
||||||
|
void close_impl(mutex_t::scoped_lock& l);
|
||||||
|
|
||||||
void log(char const* msg, mutex_t::scoped_lock& l);
|
void log(char const* msg, mutex_t::scoped_lock& l);
|
||||||
void disable(error_code const& ec, mutex_t::scoped_lock& l);
|
void disable(error_code const& ec, mutex_t::scoped_lock& l);
|
||||||
|
|
|
@ -154,7 +154,7 @@ void natpmp::disable(error_code const& ec, mutex_t::scoped_lock& l)
|
||||||
m_callback(index, 0, ec);
|
m_callback(index, 0, ec);
|
||||||
l.lock();
|
l.lock();
|
||||||
}
|
}
|
||||||
close();
|
close_impl(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
void natpmp::delete_mapping(int index)
|
void natpmp::delete_mapping(int index)
|
||||||
|
@ -550,6 +550,11 @@ void natpmp::mapping_expired(error_code const& e, int i)
|
||||||
void natpmp::close()
|
void natpmp::close()
|
||||||
{
|
{
|
||||||
mutex_t::scoped_lock l(m_mutex);
|
mutex_t::scoped_lock l(m_mutex);
|
||||||
|
close_impl(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
void natpmp::close_impl(mutex_t::scoped_lock& l)
|
||||||
|
{
|
||||||
m_abort = true;
|
m_abort = true;
|
||||||
log("closing", l);
|
log("closing", l);
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue