fixed bugs in verbose logging

This commit is contained in:
Arvid Norberg 2008-09-04 14:39:02 +00:00
parent e4e0d3f062
commit c7c0974d3f
2 changed files with 4 additions and 4 deletions

View File

@ -945,7 +945,7 @@ namespace libtorrent
{
std::stringstream msg;
msg << "got bitfield with invalid size: " << (packet_size() - 1)
<< "bytes. expected: " << ((t->torrent_file().num_pieces() + 7) / 8)
<< " bytes. expected: " << ((t->torrent_file().num_pieces() + 7) / 8)
<< " bytes";
disconnect(msg.str().c_str(), 2);
return;
@ -1444,7 +1444,7 @@ namespace libtorrent
{
// don't send a bitfield if we don't have any pieces
#ifdef TORRENT_VERBOSE_LOGGING
(*m_logger) << time_now_string() << " *** NOT SENDING BITFIELD";
(*m_logger) << time_now_string() << " *** NOT SENDING BITFIELD\n";
#endif
#ifndef NDEBUG
m_sent_bitfield = true;

View File

@ -1572,7 +1572,7 @@ namespace libtorrent
"s: " << p.start << " | "
"l: " << p.length << " | "
"ds: " << statistics().download_rate() << " | "
"qs: " << m_desired_queue_size << " ]\n";
"qs: " << int(m_desired_queue_size) << " ]\n";
#endif
if (p.length == 0)
@ -2333,7 +2333,7 @@ namespace libtorrent
"s: " << r.start << " | "
"l: " << r.length << " | "
"ds: " << statistics().download_rate() << " B/s | "
"qs: " << m_desired_queue_size << " "
"qs: " << int(m_desired_queue_size) << " "
"blk: " << (m_request_large_blocks?"large":"single") << " ]\n";
#endif
}