fixed debug logging bug

This commit is contained in:
Arvid Norberg 2009-04-24 17:04:20 +00:00
parent 4421ccf11c
commit 4476a44160
1 changed files with 8 additions and 5 deletions

View File

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