From a542ad81e7a79db04f0919e912382efd8071fbe2 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 21 Feb 2014 00:29:27 -0300 Subject: [PATCH] revert tracker dhtget patch of 0.9.16 and report number of peers received --- libtorrent/src/kademlia/dht_get.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libtorrent/src/kademlia/dht_get.cpp b/libtorrent/src/kademlia/dht_get.cpp index 8871bd80..fd8cfca9 100644 --- a/libtorrent/src/kademlia/dht_get.cpp +++ b/libtorrent/src/kademlia/dht_get.cpp @@ -132,10 +132,13 @@ void dht_get_observer::reply(msg const& m) // pretend it is a normal dht resource to the caller dht_get *dget( static_cast(m_algorithm.get()) ); if( dget->m_targetResource == "tracker" && dget->m_multi ) { - const lazy_entry *followers = r->dict_find("followers"); + int followers = r->dict_find_int_value("followers"); if( followers ) { entry::dictionary_type v; - v["followers"] = followers->int_value(); + v["followers"] = followers; + const lazy_entry *values = r->dict_find_list("values"); + if( values ) + v["values_size"] = values->list_size(); entry::dictionary_type target; target["n"] = dget->m_targetUser;