diff --git a/include/libtorrent/torrent_status.hpp b/include/libtorrent/torrent_status.hpp index 2efe827f1..9d866cb58 100644 --- a/include/libtorrent/torrent_status.hpp +++ b/include/libtorrent/torrent_status.hpp @@ -130,7 +130,6 @@ namespace libtorrent error_code errc; int error_file; - // special values for error_file to describe which file or component // encountered the error (``errc``). enum error_file_t { diff --git a/src/torrent_handle.cpp b/src/torrent_handle.cpp index 51f4cdec6..fa4d310b0 100644 --- a/src/torrent_handle.cpp +++ b/src/torrent_handle.cpp @@ -144,7 +144,8 @@ namespace libtorrent { torrent_status::torrent_status() - : total_download(0) + : error_file(torrent_status::error_file_none) + , total_download(0) , total_upload(0) , total_payload_download(0) , total_payload_upload(0) diff --git a/test/test_checking.cpp b/test/test_checking.cpp index 96e243257..d19386a9d 100644 --- a/test/test_checking.cpp +++ b/test/test_checking.cpp @@ -212,7 +212,7 @@ void test_checking(int flags = read_only_files) && st.state != torrent_status::checking_resume_data) break; - if (!st.errc) break; + if (st.errc) break; test_sleep(500); } if (flags & incomplete_files) @@ -242,7 +242,7 @@ void test_checking(int flags = read_only_files) st = tor1.status(); TEST_CHECK(!st.is_seeding); - TEST_CHECK(!st.errc); + TEST_CHECK(st.errc); if (st.errc) fprintf(stderr, "error: %s\n", st.errc.message().c_str()); }