fixed incoming peer source flag and exposed it in client_test
This commit is contained in:
parent
87eb945811
commit
5bce212126
|
@ -371,7 +371,7 @@ void print_peer_info(std::string& out, std::vector<libtorrent::peer_info> const&
|
|||
#endif
|
||||
|
||||
snprintf(str, sizeof(str)
|
||||
, "%s%s (%s|%s) %s%s (%s|%s) %s%3d (%3d) %3d %c%c%c%c%c%c%c%c%c%c%c%c%c%c %c%c%c%c%c "
|
||||
, "%s%s (%s|%s) %s%s (%s|%s) %s%3d (%3d) %3d %c%c%c%c%c%c%c%c%c%c%c%c%c%c %c%c%c%c%c%c "
|
||||
, esc("32"), add_suffix(i->down_speed, "/s").c_str()
|
||||
, add_suffix(i->total_download).c_str(), add_suffix(i->download_rate_peak, "/s").c_str()
|
||||
, esc("31"), add_suffix(i->up_speed, "/s").c_str(), add_suffix(i->total_upload).c_str()
|
||||
|
@ -406,7 +406,8 @@ void print_peer_info(std::string& 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':'_'
|
||||
, (i->source & peer_info::incoming)?'I':'_');
|
||||
out += str;
|
||||
|
||||
if (print_fails)
|
||||
|
|
|
@ -799,6 +799,7 @@ namespace libtorrent
|
|||
#endif
|
||||
i->inet_as = ses.lookup_as(as);
|
||||
#endif
|
||||
i->source = peer_info::incoming;
|
||||
}
|
||||
|
||||
TORRENT_ASSERT(i);
|
||||
|
|
Loading…
Reference in New Issue