From a2f9337b6924a77ae82d66ffbeebed5e8b638cc2 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 17 Jul 2013 20:38:25 +0000 Subject: [PATCH] fix client_test --- examples/client_test.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 95e1b332d..90d548a90 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -714,9 +714,7 @@ void add_torrent(libtorrent::session& ses std::string filename = combine_path(save_path, combine_path(".resume", to_hex(t->info_hash().to_string()) + ".resume")); - std::vector buf; - if (load_file(filename.c_str(), buf, ec) == 0) - p.resume_data = &buf; + load_file(filename.c_str(), p.resume_data, ec); p.ti = t; p.save_path = save_path; @@ -1508,8 +1506,7 @@ int main(int argc, char* argv[]) std::string filename = combine_path(save_path, combine_path(".resume" , to_hex(tmp.info_hash.to_string()) + ".resume")); - if (load_file(filename.c_str(), buf, ec) == 0) - p.resume_data = &buf; + load_file(filename.c_str(), p.resume_data, ec); } printf("adding URL: %s\n", i->c_str()); @@ -1640,8 +1637,7 @@ int main(int argc, char* argv[]) std::string filename = combine_path(save_path, combine_path(".resume" , to_hex(tmp.info_hash.to_string()) + ".resume")); - if (load_file(filename.c_str(), buf, ec) == 0) - p.resume_data = &buf; + load_file(filename.c_str(), p.resume_data, ec); } printf("adding URL: %s\n", url);