forward port fix to post torrent_added_alert earlier, from RC_1_0
This commit is contained in:
parent
d14ce48ec4
commit
44abd1a59b
|
@ -4834,6 +4834,10 @@ retry:
|
||||||
|
|
||||||
torrent_ptr = boost::make_shared<torrent>(boost::ref(*this)
|
torrent_ptr = boost::make_shared<torrent>(boost::ref(*this)
|
||||||
, 16 * 1024, queue_pos, boost::cref(params), boost::cref(*ih));
|
, 16 * 1024, queue_pos, boost::cref(params), boost::cref(*ih));
|
||||||
|
|
||||||
|
if (m_alerts.should_post<torrent_added_alert>())
|
||||||
|
m_alerts.emplace_alert<torrent_added_alert>(torrent_ptr->get_handle());
|
||||||
|
|
||||||
torrent_ptr->set_ip_filter(m_ip_filter);
|
torrent_ptr->set_ip_filter(m_ip_filter);
|
||||||
torrent_ptr->start(params);
|
torrent_ptr->start(params);
|
||||||
|
|
||||||
|
@ -4913,9 +4917,6 @@ retry:
|
||||||
m_uuids.insert(std::make_pair(params.uuid.empty()
|
m_uuids.insert(std::make_pair(params.uuid.empty()
|
||||||
? params.url : params.uuid, torrent_ptr));
|
? params.url : params.uuid, torrent_ptr));
|
||||||
|
|
||||||
if (m_alerts.should_post<torrent_added_alert>())
|
|
||||||
m_alerts.emplace_alert<torrent_added_alert>(torrent_ptr->get_handle());
|
|
||||||
|
|
||||||
// recalculate auto-managed torrents sooner (or put it off)
|
// recalculate auto-managed torrents sooner (or put it off)
|
||||||
// if another torrent will be added within one second from now
|
// if another torrent will be added within one second from now
|
||||||
// we want to put it off again anyway. So that while we're adding
|
// we want to put it off again anyway. So that while we're adding
|
||||||
|
|
Loading…
Reference in New Issue