forked from premiere/premiere-libtorrent
fixed documentation and client_test code when waiting for resume_data_alert
This commit is contained in:
parent
70119a6b53
commit
1c1ba2b383
|
@ -2224,6 +2224,14 @@ Example code to pause and save resume data for all torrents and wait for the ale
|
|||
if (a == 0) break;
|
||||
|
||||
std::auto_ptr<alert> holder = ses.pop_alert();
|
||||
|
||||
if (dynamic_cast<save_resume_data_failed_alert const*>(a))
|
||||
{
|
||||
process_alert(a);
|
||||
--num_resume_data;
|
||||
continue;
|
||||
}
|
||||
|
||||
save_resume_data_alert const* rd = dynamic_cast<save_resume_data_alert const*>(a);
|
||||
if (rd == 0)
|
||||
{
|
||||
|
|
|
@ -1142,6 +1142,12 @@ int main(int ac, char* av[])
|
|||
::print_alert(holder.get(), std::cout);
|
||||
std::cout << std::endl;
|
||||
|
||||
if (dynamic_cast<save_resume_data_failed_alert const*>(a))
|
||||
{
|
||||
--num_resume_data;
|
||||
continue;
|
||||
}
|
||||
|
||||
save_resume_data_alert const* rd = dynamic_cast<save_resume_data_alert const*>(a);
|
||||
if (!rd) continue;
|
||||
--num_resume_data;
|
||||
|
|
Loading…
Reference in New Issue