fixed minor error handling logging and assert issue in disk io thread

This commit is contained in:
Arvid Norberg 2010-11-26 20:38:31 +00:00
parent ba5b0638c0
commit 27f84d1618
2 changed files with 3 additions and 3 deletions

View File

@ -2344,7 +2344,7 @@ namespace libtorrent
ret = piece_manager::fatal_disk_error; ret = piece_manager::fatal_disk_error;
break; break;
} }
TORRENT_ASSERT(ret != -2 || !j.str.empty()); TORRENT_ASSERT(ret != -2 || j.error);
// if the check is not done, add it at the end of the job queue // if the check is not done, add it at the end of the job queue
if (ret == piece_manager::need_full_check) if (ret == piece_manager::need_full_check)
@ -2400,7 +2400,7 @@ namespace libtorrent
#ifndef BOOST_NO_EXCEPTIONS #ifndef BOOST_NO_EXCEPTIONS
try { try {
#endif #endif
TORRENT_ASSERT(ret != -2 || !j.str.empty() TORRENT_ASSERT(ret != -2 || j.error
|| j.action == disk_io_job::hash); || j.action == disk_io_job::hash);
#if TORRENT_DISK_STATS #if TORRENT_DISK_STATS
if ((j.action == disk_io_job::read || j.action == disk_io_job::read_and_hash) if ((j.action == disk_io_job::read || j.action == disk_io_job::read_and_hash)

View File

@ -1298,7 +1298,7 @@ namespace libtorrent
} }
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
(*m_ses.m_logger) << time_now_string() << ": fatal disk error [" (*m_ses.m_logger) << time_now_string() << ": fatal disk error ["
" error: " << j.str << " error: " << j.error.message() <<
" torrent: " << torrent_file().name() << " torrent: " << torrent_file().name() <<
" ]\n"; " ]\n";
#endif #endif