fixed debug logging bug

This commit is contained in:
Arvid Norberg
2009-04-24 17:04:20 +00:00
parent 4421ccf11c
commit 4476a44160

View File

@@ -518,11 +518,14 @@ namespace libtorrent
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
boost::shared_ptr<request_callback> cb = requester(); boost::shared_ptr<request_callback> cb = requester();
char hex_ih[41]; if (cb)
to_hex((char const*)&req.info_hash[0], 20, hex_ih); {
char msg[200]; char hex_ih[41];
snprintf(msg, 200, "==> UDP_TRACKER_ANNOUNCE [%s]", hex_ih); to_hex((char const*)&req.info_hash[0], 20, hex_ih);
cb->debug_log(msg); char msg[200];
snprintf(msg, 200, "==> UDP_TRACKER_ANNOUNCE [%s]", hex_ih);
cb->debug_log(msg);
}
#endif #endif
error_code ec; error_code ec;