fixed missing header include. added todo comment at a reported bug

This commit is contained in:
Arvid Norberg 2006-08-10 23:36:58 +00:00
parent 87eb377b17
commit 8227b160ea
2 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define TRAVERSAL_ALGORITHM_050324_HPP #define TRAVERSAL_ALGORITHM_050324_HPP
#include <vector> #include <vector>
#include <set>
#include <libtorrent/kademlia/node_id.hpp> #include <libtorrent/kademlia/node_id.hpp>
#include <libtorrent/kademlia/routing_table.hpp> #include <libtorrent/kademlia/routing_table.hpp>

View File

@ -445,6 +445,8 @@ namespace libtorrent
m_dht_announce_timer.expires_from_now(boost::posix_time::minutes(30)); 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)); m_dht_announce_timer.async_wait(bind(&torrent::on_dht_announce, this, _1));
if (!m_ses.m_dht) return; 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_dht->announce(m_torrent_file.info_hash()
, m_ses.m_listen_interface.port() , m_ses.m_listen_interface.port()
, bind(&torrent::on_dht_announce_response, this, _1)); , bind(&torrent::on_dht_announce_response, this, _1));