From a961e253ef8a90e3452fa49c43626296c6c3a403 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 7 May 2009 16:30:14 +0000 Subject: [PATCH] fix logging build --- include/libtorrent/session.hpp | 4 +--- src/policy.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 4c1f968ed..47d5afdbd 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -56,13 +56,11 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/fingerprint.hpp" #include "libtorrent/disk_io_thread.hpp" #include "libtorrent/peer_id.hpp" +#include "libtorrent/alert.hpp" #include "libtorrent/storage.hpp" #include -#ifndef TORRENT_NO_DEPRECATE -#include "libtorrent/alert.hpp" -#endif #ifdef _MSC_VER # include diff --git a/src/policy.cpp b/src/policy.cpp index 78724e9a2..fb6979ba5 100644 --- a/src/policy.cpp +++ b/src/policy.cpp @@ -508,14 +508,14 @@ namespace libtorrent } #if defined TORRENT_LOGGING || defined TORRENT_VERBOSE_LOGGING - if (candidate != m_peers.end()) + if (candidate != -1) { (*m_torrent->session().m_logger) << time_now_string() << " *** FOUND CONNECTION CANDIDATE [" - " ip: " << (*candidate)->ip() << - " d: " << cidr_distance(external_ip, (*candidate)->address()) << + " ip: " << m_peers[candidate]->ip() << + " d: " << cidr_distance(external_ip, m_peers[candidate]->address()) << " external: " << external_ip << - " t: " << (session_time - (*candidate)->last_connected) << + " t: " << (session_time - m_peers[candidate]->last_connected) << " ]\n"; } #endif