From 942c4e0a7cc4f495ca0005e41aaa2ee999ee9f1e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 23 Jan 2010 22:42:48 +0000 Subject: [PATCH] fixed torrent_deleted_alert to not dead-lock --- include/libtorrent/alert_types.hpp | 4 ++-- src/torrent.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/libtorrent/alert_types.hpp b/include/libtorrent/alert_types.hpp index e8cd75245..f5eb1d156 100644 --- a/include/libtorrent/alert_types.hpp +++ b/include/libtorrent/alert_types.hpp @@ -667,9 +667,9 @@ namespace libtorrent struct TORRENT_EXPORT torrent_deleted_alert: torrent_alert { - torrent_deleted_alert(torrent_handle const& h) + torrent_deleted_alert(torrent_handle const& h, sha1_hash const& ih) : torrent_alert(h) - { info_hash = h.info_hash(); } + { info_hash = ih; } TORRENT_DEFINE_ALERT(torrent_deleted_alert); diff --git a/src/torrent.cpp b/src/torrent.cpp index 8de096000..5dbfa192a 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2398,7 +2398,7 @@ namespace libtorrent else { if (alerts().should_post()) - alerts().post_alert(torrent_deleted_alert(get_handle())); + alerts().post_alert(torrent_deleted_alert(get_handle(), m_torrent_file->info_hash())); } }