add verbose peer logging for setting TOS byte

This commit is contained in:
Arvid Norberg 2011-11-10 09:18:55 +00:00
parent a60cfa3319
commit 3eb1b1839d
1 changed files with 8 additions and 0 deletions

View File

@ -565,7 +565,12 @@ namespace libtorrent
}
TORRENT_ASSERT(m_remote.address() != address_v4::any());
if (m_remote.address().is_v4())
{
m_socket->set_option(type_of_service(m_ses.settings().peer_tos), ec);
#if defined TORRENT_VERBOSE_LOGGING
peer_log(">>> SET_TOS[ tos: %d e: %s ]", m_ses.settings().peer_tos, ec.message().c_str());
#endif
}
}
if (t && t->ready_for_connections())
@ -5401,6 +5406,9 @@ namespace libtorrent
{
error_code ec;
m_socket->set_option(type_of_service(m_ses.settings().peer_tos), ec);
#if defined TORRENT_VERBOSE_LOGGING
peer_log(">>> SET_TOS[ tos: %d e: %s ]", m_ses.settings().peer_tos, ec.message().c_str());
#endif
}
on_connected();