updated documentation on saving resume data and fixed client_test to do it properly

This commit is contained in:
Arvid Norberg
2008-10-17 02:26:08 +00:00
parent c04183d960
commit 18017c3f72
2 changed files with 18 additions and 13 deletions

View File

@@ -1100,18 +1100,16 @@ int main(int ac, char* av[])
// keep track of the number of resume data
// alerts to wait for
int num_resume_data = 0;
ses.pause();
for (handles_t::iterator i = handles.begin();
i != handles.end(); ++i)
{
torrent_handle& h = i->second;
if (!h.is_valid()) continue;
h.auto_managed(false);
if (h.is_paused()) continue;
h.pause();
if (!h.has_metadata()) continue;
// pause
std::cout << "pausing " << h.name() << std::endl;
std::cout << "saving resume data for " << h.name() << std::endl;
// save_resume_data will generate an alert when it's done
h.save_resume_data();
++num_resume_data;