Iterate correctly when removing all torrents.

This commit is contained in:
Josh Elsasser 2007-07-16 17:22:57 +00:00
parent 1d95bcc689
commit 7befa196a1
1 changed files with 4 additions and 0 deletions

View File

@ -801,6 +801,10 @@ tormsg( enum ipc_msg id, benc_val_t * val, int64_t tag, void * arg )
while( NULL != ( iter = torrent_iter( iter, &ii ) ) )
{
func( ii );
if( torrent_remove == func )
{
iter = NULL;
}
}
}
/* remove/start/stop requested list of torrents */