eliminate one more session dependency in peer_connection

This commit is contained in:
Arvid Norberg 2015-04-10 01:50:42 +00:00
parent 06135941f3
commit bb48b6e83c
5 changed files with 1 additions and 18 deletions

View File

@ -1134,7 +1134,6 @@ namespace libtorrent
#if defined TORRENT_LOGGING
virtual void session_log(char const* fmt, ...) const;
virtual void session_vlog(char const* fmt, va_list& va) const;
void log_all_torrents(peer_connection* p);
// this list of tracker loggers serves as tracker_callbacks when
// shutting down. This list is just here to keep them alive during

View File

@ -106,7 +106,6 @@ namespace libtorrent { namespace aux
#if defined TORRENT_LOGGING
virtual void session_log(char const* fmt, ...) const = 0;
virtual void session_vlog(char const* fmt, va_list& va) const = 0;
virtual void log_all_torrents(peer_connection* p) = 0;
#endif
#if TORRENT_USE_ASSERTS

View File

@ -71,11 +71,6 @@ namespace libtorrent
{
class torrent;
namespace detail
{
struct session_impl;
}
class TORRENT_EXTRA_EXPORT bt_peer_connection
: public peer_connection
{

View File

@ -390,9 +390,9 @@ namespace libtorrent
return;
}
#if defined TORRENT_LOGGING
tcp::endpoint bound_ip = m_ses.bind_outgoing_socket(*m_socket
, m_remote.address(), ec);
#if defined TORRENT_LOGGING
peer_log(">>> BIND [ dst: %s ec: %s ]", print_endpoint(bound_ip).c_str()
, ec.message().c_str());
#endif
@ -1196,7 +1196,6 @@ namespace libtorrent
// we couldn't find the torrent!
#if defined TORRENT_LOGGING
peer_log("*** couldn't find a torrent with the given info_hash: %s torrents:", to_hex(ih.to_string()).c_str());
m_ses.log_all_torrents(this);
#endif
#ifndef TORRENT_DISABLE_DHT

View File

@ -4296,15 +4296,6 @@ retry:
m_alerts.emplace_alert<log_alert>(buf);
}
void session_impl::log_all_torrents(peer_connection* p)
{
for (session_impl::torrent_map::const_iterator i = m_torrents.begin()
, end(m_torrents.end()); i != end; ++i)
{
p->peer_log(" %s", to_hex(i->second->torrent_file().info_hash().to_string()).c_str());
}
}
#endif
void session_impl::get_torrent_status(std::vector<torrent_status>* ret