* Added tracker re-requesting when connected to less than minimum

peers, currently doesn't handle multi-trackers nor do various safety
checks.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@520 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-08-09 14:49:00 +00:00
parent 65d940484a
commit 6590f5608f
+7 -2
View File
@@ -39,6 +39,7 @@
#include <sstream>
#include <iomanip>
#include <torrent/rate.h>
#include <torrent/tracker.h>
#include "core/download.h"
#include "utils/timer.h"
@@ -82,8 +83,12 @@ print_download_status(char* buf, unsigned int length, core::Download* d) {
if (d->get_download().is_hash_checking())
buf += std::max(0, snprintf(buf, length, "Checking hash"));
else if (d->get_download().is_tracker_busy())
buf += std::max(0, snprintf(buf, length, "Tracker: Connecting"));
else if (d->get_download().is_tracker_busy() &&
d->get_download().get_tracker_focus() < d->get_download().get_tracker_size())
buf += std::max(0, snprintf(buf, length, "Tracker[%i:%i]: Connecting to %s",
d->get_download().get_tracker(d->get_download().get_tracker_focus()).get_group(),
d->get_download().get_tracker_focus(),
d->get_download().get_tracker(d->get_download().get_tracker_focus()).get_url().c_str()));
else if (!d->get_download().is_active())
buf += std::max(0, snprintf(buf, length, "Inactive"));