Stop waiting transfers before stopping others. This way, for a group of transfers to be stopped, a waiting one won't start if an active one is stopped first.

This commit is contained in:
Mitchell Livingston 2011-08-06 15:31:19 +00:00
parent 897e2f2e51
commit b59cb97da4
1 changed files with 6 additions and 6 deletions

View File

@ -1233,10 +1233,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) stopTorrents: (NSArray *) torrents
{
#warning look into stopping all without starting any
//don't want any of these starting then stopping
/*for (Torrent * torrent in torrents)
[torrent setWaitToStart: NO];*/
for (Torrent * torrent in torrents)
if ([torrent waitingToStart])
[torrent stopTransfer];
for (Torrent * torrent in torrents)
[torrent stopTransfer];
@ -1333,10 +1333,10 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
NSMutableArray * selectedValues = [NSMutableArray arrayWithArray: [fTableView selectedValues]];
[selectedValues removeObjectsInArray: torrents];
#warning look into stopping all without starting any
//don't want any of these starting then stopping
/*for (Torrent * torrent in torrents)
[torrent setWaitToStart: NO];*/
for (Torrent * torrent in torrents)
if ([torrent waitingToStart])
[torrent stopTransfer];
[fTorrents removeObjectsInArray: torrents];