forked from premiere/premiere-libtorrent
fixed release asserts issue in kademlia code
This commit is contained in:
parent
dbe0554458
commit
d52eb9ed19
|
@ -196,7 +196,7 @@ observer_ptr find_data::new_observer(void* ptr
|
||||||
, udp::endpoint const& ep, node_id const& id)
|
, udp::endpoint const& ep, node_id const& id)
|
||||||
{
|
{
|
||||||
observer_ptr o(new (ptr) find_data_observer(this, ep, id));
|
observer_ptr o(new (ptr) find_data_observer(this, ep, id));
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||||
o->m_in_constructor = false;
|
o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return o;
|
return o;
|
||||||
|
|
|
@ -273,7 +273,7 @@ namespace
|
||||||
void* ptr = node.m_rpc.allocate_observer();
|
void* ptr = node.m_rpc.allocate_observer();
|
||||||
if (ptr == 0) return;
|
if (ptr == 0) return;
|
||||||
observer_ptr o(new (ptr) announce_observer(algo, i->first.ep(), i->first.id));
|
observer_ptr o(new (ptr) announce_observer(algo, i->first.ep(), i->first.id));
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||||
o->m_in_constructor = false;
|
o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
entry e;
|
entry e;
|
||||||
|
@ -310,7 +310,7 @@ void node_impl::add_node(udp::endpoint node)
|
||||||
boost::intrusive_ptr<traversal_algorithm> algo(
|
boost::intrusive_ptr<traversal_algorithm> algo(
|
||||||
new traversal_algorithm(*this, (node_id::min)()));
|
new traversal_algorithm(*this, (node_id::min)()));
|
||||||
observer_ptr o(new (ptr) null_observer(algo, node, node_id(0)));
|
observer_ptr o(new (ptr) null_observer(algo, node, node_id(0)));
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||||
o->m_in_constructor = false;
|
o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
entry e;
|
entry e;
|
||||||
|
|
|
@ -62,7 +62,7 @@ observer_ptr refresh::new_observer(void* ptr
|
||||||
, udp::endpoint const& ep, node_id const& id)
|
, udp::endpoint const& ep, node_id const& id)
|
||||||
{
|
{
|
||||||
observer_ptr o(new (ptr) find_data_observer(this, ep, id));
|
observer_ptr o(new (ptr) find_data_observer(this, ep, id));
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||||
o->m_in_constructor = false;
|
o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return o;
|
return o;
|
||||||
|
|
|
@ -53,7 +53,7 @@ observer_ptr traversal_algorithm::new_observer(void* ptr
|
||||||
, udp::endpoint const& ep, node_id const& id)
|
, udp::endpoint const& ep, node_id const& id)
|
||||||
{
|
{
|
||||||
observer_ptr o(new (ptr) null_observer(boost::intrusive_ptr<traversal_algorithm>(this), ep, id));
|
observer_ptr o(new (ptr) null_observer(boost::intrusive_ptr<traversal_algorithm>(this), ep, id));
|
||||||
#ifdef TORRENT_DEBUG
|
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
||||||
o->m_in_constructor = false;
|
o->m_in_constructor = false;
|
||||||
#endif
|
#endif
|
||||||
return o;
|
return o;
|
||||||
|
|
Loading…
Reference in New Issue