fix logging build

This commit is contained in:
Arvid Norberg 2009-05-07 16:30:14 +00:00
parent d0786a0fde
commit a961e253ef
2 changed files with 5 additions and 7 deletions
include/libtorrent
src

View File

@ -56,13 +56,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include "libtorrent/fingerprint.hpp" #include "libtorrent/fingerprint.hpp"
#include "libtorrent/disk_io_thread.hpp" #include "libtorrent/disk_io_thread.hpp"
#include "libtorrent/peer_id.hpp" #include "libtorrent/peer_id.hpp"
#include "libtorrent/alert.hpp"
#include "libtorrent/storage.hpp" #include "libtorrent/storage.hpp"
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>
#ifndef TORRENT_NO_DEPRECATE
#include "libtorrent/alert.hpp"
#endif
#ifdef _MSC_VER #ifdef _MSC_VER
# include <eh.h> # include <eh.h>

View File

@ -508,14 +508,14 @@ namespace libtorrent
} }
#if defined TORRENT_LOGGING || defined TORRENT_VERBOSE_LOGGING #if defined TORRENT_LOGGING || defined TORRENT_VERBOSE_LOGGING
if (candidate != m_peers.end()) if (candidate != -1)
{ {
(*m_torrent->session().m_logger) << time_now_string() (*m_torrent->session().m_logger) << time_now_string()
<< " *** FOUND CONNECTION CANDIDATE [" << " *** FOUND CONNECTION CANDIDATE ["
" ip: " << (*candidate)->ip() << " ip: " << m_peers[candidate]->ip() <<
" d: " << cidr_distance(external_ip, (*candidate)->address()) << " d: " << cidr_distance(external_ip, m_peers[candidate]->address()) <<
" external: " << external_ip << " external: " << external_ip <<
" t: " << (session_time - (*candidate)->last_connected) << " t: " << (session_time - m_peers[candidate]->last_connected) <<
" ]\n"; " ]\n";
} }
#endif #endif