don't use pointers to resume_data and file_priorities in add_torrent_params
This commit is contained in:
@@ -977,9 +977,7 @@ void test_fastresume(std::string const& test_path)
|
||||
p.ti = new torrent_info(*t);
|
||||
p.save_path = combine_path(test_path, "tmp1");
|
||||
p.storage_mode = storage_mode_compact;
|
||||
std::vector<char> resume_buf;
|
||||
bencode(std::back_inserter(resume_buf), resume);
|
||||
p.resume_data = &resume_buf;
|
||||
bencode(std::back_inserter(p.resume_data), resume);
|
||||
torrent_handle h = ses.add_torrent(p, ec);
|
||||
|
||||
std::auto_ptr<alert> a = ses.pop_alert();
|
||||
@@ -1071,9 +1069,7 @@ void test_rename_file_in_fastresume(std::string const& test_path)
|
||||
p.ti = new torrent_info(*t);
|
||||
p.save_path = combine_path(test_path, "tmp2");
|
||||
p.storage_mode = storage_mode_compact;
|
||||
std::vector<char> resume_buf;
|
||||
bencode(std::back_inserter(resume_buf), resume);
|
||||
p.resume_data = &resume_buf;
|
||||
bencode(std::back_inserter(p.resume_data), resume);
|
||||
torrent_handle h = ses.add_torrent(p, ec);
|
||||
|
||||
for (int i = 0; i < 5; ++i)
|
||||
|
Reference in New Issue
Block a user