removed old commented out code. polished client_test output

This commit is contained in:
Arvid Norberg 2007-03-02 06:49:00 +00:00
parent 8f1128f540
commit be574bcc33
2 changed files with 4 additions and 26 deletions

View File

@ -254,9 +254,9 @@ void print_peer_info(std::ostream& out, std::vector<libtorrent::peer_info> const
{
out.fill(' ');
out.width(2);
out << esc("32") << add_suffix(i->down_speed) << "/s "
out << esc("32") << (i->down_speed > 0 ? add_suffix(i->down_speed) + "/s " : " ")
<< "(" << add_suffix(i->total_download) << ") " << esc("0")
<< esc("31") << add_suffix(i->up_speed) << "/s "
<< esc("31") << (i->up_speed > 0 ? add_suffix(i->up_speed) + "/s ": " ")
<< "(" << add_suffix(i->total_upload) << ") " << esc("0")
<< to_string(i->download_queue_length, 2, 2) << " "
<< to_string(i->upload_queue_length, 2, 2) << " "
@ -892,14 +892,14 @@ int main(int ac, char* av[])
out << "peers: " << s.num_peers << " "
<< "seeds: " << s.num_seeds << " "
<< "distributed copies: " << s.distributed_copies << "\n"
<< " download: " << esc("32") << add_suffix(s.download_rate) << "/s " << esc("0")
<< " download: " << esc("32") << (s.download_rate > 0 ? add_suffix(s.download_rate) + "/s ": " ") << esc("0")
<< "(" << esc("32") << add_suffix(s.total_download) << esc("0") << ") ";
}
else
{
out << "download: " << "(" << esc("32") << add_suffix(s.total_download) << esc("0") << ") ";
}
out << "upload: " << esc("31") << add_suffix(s.upload_rate) << "/s " << esc("0")
out << "upload: " << esc("31") << (s.upload_rate > 0 ? add_suffix(s.upload_rate) + "/s ": " ") << esc("0")
<< "(" << esc("31") << add_suffix(s.total_upload) << esc("0") << ") "
<< "ratio: " << ratio(s.total_payload_download, s.total_payload_upload) << "\n";
if (s.state != torrent_status::seeding)

View File

@ -1418,28 +1418,6 @@ namespace libtorrent
m_statistics.sent_bytes(amount_payload, bytes_transferred - amount_payload);
}
/*
void bt_peer_connection::on_tick()
{
boost::shared_ptr<torrent> t = associated_torrent().lock();
if (!t) return;
// if we don't have any metadata, and this peer
// supports the request metadata extension
// and we aren't currently waiting for a request
// reply. Then, send a request for some metadata.
if (!t->valid_metadata()
&& supports_extension(extended_metadata_message)
&& !m_waiting_metadata_request
&& has_metadata())
{
m_last_metadata_request = t->metadata_request();
write_metadata_request(m_last_metadata_request);
m_waiting_metadata_request = true;
m_metadata_request = second_clock::universal_time();
}
}
*/
#ifndef NDEBUG
void bt_peer_connection::check_invariant() const
{