added failcount to peer_info. fixes #31

This commit is contained in:
Arvid Norberg
2007-04-13 20:19:04 +00:00
parent 591ec48e77
commit a22ad5ad33
4 changed files with 12 additions and 5 deletions

View File

@@ -244,9 +244,7 @@ int peer_index(libtorrent::tcp::endpoint addr, std::vector<libtorrent::peer_info
void print_peer_info(std::ostream& out, std::vector<libtorrent::peer_info> const& peers)
{
using namespace libtorrent;
#ifndef ANSI_TERMINAL_COLORS
out << " down (total) up (total) q r flags source block progress country client \n";
#endif
out << " down (total) up (total) q r flags source fail block-progress country client \n";
for (std::vector<peer_info>::const_iterator i = peers.begin();
i != peers.end(); ++i)
@@ -272,8 +270,10 @@ void print_peer_info(std::ostream& out, std::vector<libtorrent::peer_info> const
<< ((i->source & peer_info::pex)?"P":"_")
<< ((i->source & peer_info::dht)?"D":"_")
<< ((i->source & peer_info::lsd)?"L":"_")
<< ((i->source & peer_info::resume_data)?"R":"_")
<< " ";
<< ((i->source & peer_info::resume_data)?"R":"_") << " ";
out.width(2);
out.fill(' ');
out << (i->failcount) << " ";
if (i->downloading_piece_index >= 0)
{