fixed logging build

This commit is contained in:
Arvid Norberg
2012-11-09 17:11:42 +00:00
parent db965ad99d
commit 85cda6cf53

View File

@@ -4995,7 +4995,7 @@ retry:
lazy_entry tmp; lazy_entry tmp;
lazy_entry const* info = 0; lazy_entry const* info = 0;
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("adding magnet link with resume data"); session_log("adding magnet link with resume data");
#endif #endif
if (lazy_bdecode(&(*params.resume_data)[0], &(*params.resume_data)[0] if (lazy_bdecode(&(*params.resume_data)[0], &(*params.resume_data)[0]
+ params.resume_data->size(), tmp, ec, &pos) == 0 + params.resume_data->size(), tmp, ec, &pos) == 0
@@ -5003,7 +5003,7 @@ retry:
&& (info = tmp.dict_find_dict("info"))) && (info = tmp.dict_find_dict("info")))
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("found metadata in resume data"); session_log("found metadata in resume data");
#endif #endif
// verify the info-hash of the metadata stored in the resume file matches // verify the info-hash of the metadata stored in the resume file matches
// the torrent we're loading // the torrent we're loading
@@ -5019,14 +5019,14 @@ retry:
|| params.info_hash.is_all_zeros()) || params.info_hash.is_all_zeros())
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("info-hash matched"); session_log("info-hash matched");
#endif #endif
params.ti = new torrent_info(resume_ih); params.ti = new torrent_info(resume_ih);
if (params.ti->parse_info_section(*info, ec, 0)) if (params.ti->parse_info_section(*info, ec, 0))
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("successfully loaded metadata from resume file"); session_log("successfully loaded metadata from resume file");
#endif #endif
// make the info-hash be the one in the resume file // make the info-hash be the one in the resume file
params.info_hash = resume_ih; params.info_hash = resume_ih;
@@ -5035,7 +5035,7 @@ retry:
else else
{ {
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
debug_log("failed to load metadata from resume file: %s" session_log("failed to load metadata from resume file: %s"
, ec.message().c_str()); , ec.message().c_str());
#endif #endif
} }
@@ -5043,14 +5043,14 @@ retry:
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
else else
{ {
debug_log("metadata info-hash failed"); session_log("metadata info-hash failed");
} }
#endif #endif
} }
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
else else
{ {
debug_log("no metadata found"); session_log("no metadata found");
} }
#endif #endif
} }