From 3eb1b1839d878163f85ad342f2b7424b6bba6733 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 10 Nov 2011 09:18:55 +0000 Subject: [PATCH] add verbose peer logging for setting TOS byte --- src/peer_connection.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index a39a56643..a6baa8f1f 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -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();