From 8227b160ea5b423eaf5a79b8f26f323a2c5ec66f Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 10 Aug 2006 23:36:58 +0000 Subject: [PATCH] fixed missing header include. added todo comment at a reported bug --- include/libtorrent/kademlia/traversal_algorithm.hpp | 1 + src/torrent.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libtorrent/kademlia/traversal_algorithm.hpp b/include/libtorrent/kademlia/traversal_algorithm.hpp index 608214f42..ce6176f56 100644 --- a/include/libtorrent/kademlia/traversal_algorithm.hpp +++ b/include/libtorrent/kademlia/traversal_algorithm.hpp @@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE. #define TRAVERSAL_ALGORITHM_050324_HPP #include +#include #include #include diff --git a/src/torrent.cpp b/src/torrent.cpp index 89dcda7c2..80d7741e3 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -445,6 +445,8 @@ namespace libtorrent m_dht_announce_timer.expires_from_now(boost::posix_time::minutes(30)); m_dht_announce_timer.async_wait(bind(&torrent::on_dht_announce, this, _1)); if (!m_ses.m_dht) return; + // TODO: BUG! This may invoke on_dht_announce() with an invalid this-pointer. + // there has to be a way to abort an announce operation on the dht. m_ses.m_dht->announce(m_torrent_file.info_hash() , m_ses.m_listen_interface.port() , bind(&torrent::on_dht_announce_response, this, _1));