forked from premiere/premiere-libtorrent
fixed logging build
This commit is contained in:
parent
0e7976675b
commit
b78aca9a53
|
@ -877,14 +877,13 @@ namespace libtorrent
|
|||
debug_log("*** tracker timed out");
|
||||
}
|
||||
|
||||
void tracker_request_error(
|
||||
tracker_request const&
|
||||
, int response_code
|
||||
, const std::string& str
|
||||
void tracker_request_error(tracker_request const& r
|
||||
, int response_code, error_code const& ec, const std::string& str
|
||||
, int retry_interval)
|
||||
{
|
||||
char msg[256];
|
||||
snprintf(msg, sizeof(msg), "*** tracker error: %d: %s", response_code, str.c_str());
|
||||
snprintf(msg, sizeof(msg), "*** tracker error: %d: %s %s"
|
||||
, response_code, ec.message().c_str(), str.c_str());
|
||||
debug_log(msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace
|
|||
// and we can't use this pointer
|
||||
if (!m_torrent.get_policy().has_peer(p)) return;
|
||||
|
||||
#ifdef TORRENT_LOGGING
|
||||
#if defined TORRENT_LOGGING || defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
char const* client = "-";
|
||||
peer_info info;
|
||||
if (p->connection)
|
||||
|
@ -215,8 +215,8 @@ namespace
|
|||
(*m_torrent.session().m_logger) << time_now_string() << " BANNING PEER [ p: " << b.piece_index
|
||||
<< " | b: " << b.block_index
|
||||
<< " | c: " << client
|
||||
<< " | hash1: " << i->second.hash
|
||||
<< " | hash2: " << e.hash
|
||||
<< " | hash1: " << i->second.digest
|
||||
<< " | hash2: " << e.digest
|
||||
<< " | ip: " << p->ip() << " ]\n";
|
||||
#endif
|
||||
m_torrent.get_policy().ban_peer(p);
|
||||
|
|
Loading…
Reference in New Issue