merged post_torrent_updates assert from libtorrent_aio

This commit is contained in:
Arvid Norberg
2012-10-06 14:31:14 +00:00
parent 84ccb31a6d
commit 83754b3427
3 changed files with 20 additions and 1 deletions

View File

@@ -672,6 +672,10 @@ namespace aux {
, m_network_thread(0)
#endif
{
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
m_posting_torrent_updates = false;
#endif
memset(m_redundant_bytes, 0, sizeof(m_redundant_bytes));
m_udp_socket.set_rate_limit(m_settings.dht_upload_rate_limit);
@@ -4792,6 +4796,10 @@ namespace aux {
std::auto_ptr<state_update_alert> alert(new state_update_alert());
alert->status.reserve(m_state_updates.size());
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
m_posting_torrent_updates = true;
#endif
for (std::vector<boost::weak_ptr<torrent> >::iterator i = m_state_updates.begin()
, end(m_state_updates.end()); i != end; ++i)
{
@@ -4803,6 +4811,10 @@ namespace aux {
}
m_state_updates.clear();
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
m_posting_torrent_updates = false;
#endif
m_alerts.post_alert_ptr(alert.release());
}