From e2f1bcaf21b06d23829138f50e6139ca228a5164 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 14 May 2011 21:00:45 +0000 Subject: [PATCH] calculate distributed copies for the selected torrent in client_test --- examples/client_test.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index dc0e2bc56..b41fae6e0 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -1292,6 +1292,14 @@ int main(int argc, char* argv[]) memset(counters, 0, sizeof(counters)); ses.get_torrent_status(&handles, boost::bind(&show_torrent, _1, torrent_filter, (int*)counters)); if (active_torrent >= int(handles.size())) active_torrent = handles.size() - 1; + else if (active_torrent >= 0) + { + // ask for distributed copies for the selected torrent. Since this + // is a somewhat expensive operation, don't do it by default for + // all torrents + handles[active_torrent] = handles[active_torrent].handle.status( + torrent_handle::query_distributed_copies); + } std::vector feeds; ses.get_feeds(feeds);