Changeset 2249


Ignore:
Timestamp:
Jun 30, 2007, 4:13:10 PM (15 years ago)
Author:
livings124
Message:

if a transfer is checking decrease the queue count for both queues but don't start the transfer

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r2239 r2249  
    14111411    while ((torrent = [enumerator nextObject]))
    14121412    {
    1413         if (![torrent isActive] && [torrent waitingToStart])
     1413        if (![torrent isActive] && ![torrent isChecking] && [torrent waitingToStart])
    14141414        {
    14151415            if (![torrent allDownloaded])
     
    14511451    NSEnumerator * enumerator = [fTorrents objectEnumerator];
    14521452    while ((torrent = [enumerator nextObject]))
    1453         if ([torrent isActive] && ![torrent isStalled] && ![torrent isError])
     1453    {
     1454        if ([torrent isChecking])
     1455        {
     1456            desired--;
     1457            if (desired <= 0)
     1458                return 0;
     1459        }
     1460        else if ([torrent isActive] && ![torrent isStalled] && ![torrent isError])
    14541461        {
    14551462            if ([torrent allDownloaded] != downloadQueue)
     
    14601467            }
    14611468        }
     1469        else;
     1470    }
    14621471   
    14631472    return desired;
  • trunk/macosx/Torrent.h

    r2237 r2249  
    164164- (BOOL) isSeeding;
    165165- (BOOL) isPaused;
    166 - (BOOL) isWaitingToChecking;
    167166- (BOOL) isChecking;
    168167- (BOOL) allDownloaded;
  • trunk/macosx/Torrent.m

    r2237 r2249  
    487487        [[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
    488488
    489     if ([self isActive] && ![self isChecking] && ![self isWaitingToChecking] )
     489    if ([self isActive] && ![self isChecking])
    490490    {
    491491        NSString * stringToAppend = @"";
     
    10801080}
    10811081
    1082 - (BOOL) isWaitingToChecking
    1083 {
    1084     return fStat->status == TR_STATUS_CHECK_WAIT;
    1085 }
    1086 
    10871082- (BOOL) isChecking
    10881083{
    1089     return fStat->status == TR_STATUS_CHECK;
     1084    return fStat->status == TR_STATUS_CHECK || fStat->status == TR_STATUS_CHECK_WAIT;
    10901085}
    10911086
Note: See TracChangeset for help on using the changeset viewer.