Changeset 10037


Ignore:
Timestamp:
Jan 29, 2010, 12:50:55 AM (12 years ago)
Author:
livings124
Message:

avoid setting the port twice when setting a random port

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/PrefsController.m

    r9844 r10037  
    342342- (void) setPort: (id) sender
    343343{
    344     const int port = [sender intValue];
     344    const tr_port port = [sender intValue];
    345345    [fDefaults setInteger: port forKey: @"BindPort"];
    346346    tr_sessionSetPeerPort(fHandle, port);
     
    353353{
    354354    const tr_port port = tr_sessionSetPeerPortRandom(fHandle);
    355    
     355    [fDefaults setInteger: port forKey: @"BindPort"];
    356356    [fPortField setIntValue: port];
    357     [self setPort: fPortField];
     357   
     358    fPeerPort = -1;
     359    [self updatePortStatus];
    358360}
    359361
Note: See TracChangeset for help on using the changeset viewer.