diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2008-02-10 02:31:49 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2008-02-10 02:31:49 +0000 |
commit | 883ce6da4a2dea30b19b52cd4116f7658165f409 (patch) | |
tree | e58e322f5112cf6a7be0197781aed7be94ae353a | |
parent | 994fbd571d0a39537d4e95cda16067d9cb12aef2 (diff) | |
download | deluge-883ce6da4a2dea30b19b52cd4116f7658165f409.tar.gz deluge-883ce6da4a2dea30b19b52cd4116f7658165f409.tar.bz2 deluge-883ce6da4a2dea30b19b52cd4116f7658165f409.zip |
fix dht asserts
-rw-r--r-- | libtorrent/include/libtorrent/kademlia/node.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libtorrent/include/libtorrent/kademlia/node.hpp b/libtorrent/include/libtorrent/kademlia/node.hpp index ee75e7f0a..d93872db9 100644 --- a/libtorrent/include/libtorrent/kademlia/node.hpp +++ b/libtorrent/include/libtorrent/kademlia/node.hpp @@ -139,9 +139,12 @@ public: void timeout() {} void reply(msg const& r) { - m_rpc.invoke(messages::announce_peer, r.addr - , observer_ptr(new (m_rpc.allocator().malloc()) announce_observer( - m_rpc.allocator(), m_info_hash, m_listen_port, r.write_token))); + observer_ptr o(new (m_rpc.allocator().malloc()) announce_observer( + m_rpc.allocator(), m_info_hash, m_listen_port, r.write_token)); +#ifndef NDEBUG + o->m_in_constructor = false; +#endif + m_rpc.invoke(messages::announce_peer, r.addr, o); m_fun(r.peers, m_info_hash); } void abort() {} |