minor ifdef tweaks and DHT logging
This commit is contained in:
parent
d7b811af1f
commit
70735a0a67
|
@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef TORRENT_SMART_BAN_HPP_INCLUDED
|
||||
#define TORRENT_SMART_BAN_HPP_INCLUDED
|
||||
|
||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push, 1)
|
||||
#endif
|
||||
|
@ -58,5 +60,7 @@ namespace libtorrent
|
|||
TORRENT_EXPORT boost::shared_ptr<torrent_plugin> create_smart_ban_plugin(torrent*, void*);
|
||||
}
|
||||
|
||||
#endif // TORRENT_DISABLE_EXTENSIONS
|
||||
|
||||
#endif // TORRENT_SMART_BAN_HPP_INCLUDED
|
||||
|
||||
|
|
|
@ -643,7 +643,13 @@ namespace libtorrent { namespace dht
|
|||
|
||||
if (m_sock.send(addr, &m_send_buf[0], (int)m_send_buf.size(), ec, send_flags))
|
||||
{
|
||||
if (ec) return false;
|
||||
if (ec)
|
||||
{
|
||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||
TORRENT_LOG(dht_tracker) << "==> " << addr << " DROPPED (" << ec.message() << ") " << log_line.str();
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
// account for IP and UDP overhead
|
||||
m_sent_bytes += m_send_buf.size() + (addr.address().is_v6() ? 48 : 28);
|
||||
|
|
Loading…
Reference in New Issue