Changeset 6733


Ignore:
Timestamp:
Sep 6, 2008, 3:07:09 PM (13 years ago)
Author:
titer
Message:

Do not delay port checking if port forwarding is disabled

Location:
trunk/macosx
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PortChecker.h

    r6363 r6733  
    4545}
    4646
    47 - (id) initForPort: (int) portNumber withDelegate: (id) delegate;
     47- (id) initForPort: (int) portNumber delay: (BOOL) delay withDelegate: (id) delegate;
    4848- (void) cancelProbe;
    4949
  • trunk/macosx/PortChecker.m

    r6365 r6733  
    3131@implementation PortChecker
    3232
    33 - (id) initForPort: (int) portNumber withDelegate: (id) delegate
     33- (id) initForPort: (int) portNumber delay: (BOOL) delay withDelegate: (id) delegate
    3434{
    3535    if ((self = [super init]))
     
    4040        fStatus = PORT_STATUS_CHECKING;
    4141       
    42         fTimer = [NSTimer scheduledTimerWithTimeInterval: CHECK_FIRE target: self selector: @selector(startProbe)
    43                     userInfo: nil repeats: NO];
     42        fTimer = [NSTimer scheduledTimerWithTimeInterval: (delay ? CHECK_FIRE : 0.1) target: self
     43                    selector: @selector(startProbe) userInfo: nil repeats: NO];
    4444    }
    4545   
  • trunk/macosx/PrefsController.m

    r6682 r6733  
    366366            [fPortChecker release];
    367367        }
    368         fPortChecker = [[PortChecker alloc] initForPort: fPeerPort withDelegate: self];
     368        fPortChecker = [[PortChecker alloc] initForPort: fPeerPort
     369            delay: tr_sessionIsPortForwardingEnabled(fHandle) withDelegate: self];
    369370    }
    370371}
Note: See TracChangeset for help on using the changeset viewer.