From 5751af2e6adf96d929c4570649dd9444886f64f4 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 20 Mar 2005 10:55:33 +0000 Subject: [PATCH] *** empty log message *** --- src/policy.cpp | 2 +- src/session.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/policy.cpp b/src/policy.cpp index a6dfa5b92..4c27c6ba9 100755 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -796,7 +796,7 @@ namespace libtorrent throw protocol_error("too many connections, refusing incoming connection"); // cause a disconnect } -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING if (c.get_socket()->sender().ip() == m_torrent->current_tracker().ip()) { m_torrent->debug_log("overriding connection limit for tracker NAT-check"); diff --git a/src/session.cpp b/src/session.cpp index 3a47b27f1..c617cac74 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -295,7 +295,7 @@ namespace libtorrent { namespace detail std::string msg = "cannot listen on the given interface '" + m_listen_interface.as_string() + "'"; m_alerts.post_alert(listen_failed_alert(msg)); } -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING std::string msg = "cannot listen on the given interface '" + m_listen_interface.as_string() + "'"; (*m_logger) << msg << "\n"; #endif @@ -312,7 +312,7 @@ namespace libtorrent { namespace detail << ", " << m_listen_port_range.second << "] could be opened for listening"; m_alerts.post_alert(listen_failed_alert(msg.str())); -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << msg.str() << "\n"; #endif m_listen_socket.reset(); @@ -326,7 +326,7 @@ namespace libtorrent { namespace detail m_alerts.post_alert(listen_failed_alert(e.what())); } -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING if (m_listen_socket) { (*m_logger) << "listening on port: " << m_listen_interface.port << "\n"; @@ -513,7 +513,7 @@ namespace libtorrent { namespace detail } catch(std::exception& e) { -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << "accept failed: " << e.what() << "\n"; #endif } @@ -522,7 +522,7 @@ namespace libtorrent { namespace detail s->set_blocking(false); // we got a connection request! m_incoming_connection = true; -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING (*m_logger) << s->sender().as_string() << " <== INCOMING CONNECTION\n"; #endif // TODO: filter ip:s @@ -622,7 +622,7 @@ namespace libtorrent { namespace detail std::string msg = "cannot listen on the given interface '" + m_listen_interface.as_string() + "'"; m_alerts.post_alert(listen_failed_alert(msg)); } -#ifndef NDEBUG +#ifdef TORRENT_VERBOSE_LOGGING std::string msg = "cannot listen on the given interface '" + m_listen_interface.as_string() + "'"; (*m_logger) << msg << "\n"; #endif