*** empty log message ***

This commit is contained in:
Arvid Norberg 2004-05-20 23:26:40 +00:00
parent 00eaae092f
commit af50fe181b
3 changed files with 23 additions and 3 deletions

View File

@ -195,6 +195,11 @@ namespace libtorrent
// the connections list.
bool http_tracker_connection::tick()
{
#ifndef NDEBUG
try
{
#endif
using namespace boost::posix_time;
time_duration d = second_clock::local_time() - m_request_time;
@ -450,7 +455,16 @@ namespace libtorrent
}
return false;
}
#ifndef NDEBUG
}
catch (std::exception&)
{
if (requester())
requester()->debug_log(std::string(m_buffer.begin(), m_buffer.end());
throw;
}
#endif
}
peer_entry http_tracker_connection::extract_peer_info(const entry& info)
{

View File

@ -297,7 +297,13 @@ namespace libtorrent
return "Generic";
}
return "Unknown";
std::string unknown("Unknown [");
for (peer_id::const_iterator i = p.begin(); i != p.end(); ++i)
{
unknown += std::isprint(*i)?*i:'.';
}
unknown += "]";
return unknown;
}
}

View File

@ -487,7 +487,7 @@ namespace libtorrent
// if there is no first choice candidate, this candidate will be chosen.
// it is the candidate that we owe the least to.
peer* secondCandidate = 0;
size_type lowest_share_diff; // not valid when secondCandidate==0
size_type lowest_share_diff = 0; // not valid when secondCandidate==0
for (std::vector<peer>::iterator i = m_peers.begin();
i != m_peers.end();