Changeset 82

Show
Ignore:
Timestamp:
12/27/05 16:40:18 (3 years ago)
Author:
mrowe
Message:

Remove the mysteriously unuseful openPanel and corresponding lock from SSHAgent. It's only set in a single place, and never accessed again. Odd.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Libs/SSHAgent.h

    r3 r82  
    1111        NSArray *keysOnAgent; 
    1212 
    13         BOOL openPanel; 
    14  
    1513        /* Locks */ 
    1614        NSLock *socketPathLock; 
    1715        NSLock *agentSocketPathLock; 
    1816        NSLock *keysOnAgentLock; 
    19         NSLock *openPanelLock; 
    2017        NSLock *thePidLock; 
    2118} 
  • trunk/Libs/SSHAgent.m

    r81 r82  
    5555        agentSocketPathLock = [[NSLock alloc] init]; 
    5656        keysOnAgentLock = [[NSLock alloc] init]; 
    57         openPanelLock = [[NSLock alloc] init]; 
    5857        thePidLock = [[NSLock alloc] init]; 
    5958         
     
    6867        [agentSocketPathLock dealloc]; 
    6968        [keysOnAgentLock dealloc]; 
    70         [openPanelLock dealloc]; 
    7169        [thePidLock dealloc]; 
    7270 
     
    639637        } 
    640638 
    641         if(([[self keysOnAgent] count] < 1) && ([[NSUserDefaults standardUserDefaults] boolForKey:AddKeysOnConnectionString]))  
    642         { 
    643  
     639        if ([[self keysOnAgent] count] < 1 && [[NSUserDefaults standardUserDefaults] boolForKey:AddKeysOnConnectionString]) 
     640        { 
    644641                keychain = [SSHKeychain currentKeychain]; 
    645642 
    646                 if((keychain != nil) && ([keychain count] > 0)) 
    647                 { 
    648                         [openPanelLock lock]; 
    649                         openPanel = YES; 
    650                         [openPanelLock unlock]; 
    651          
     643                if ([keychain count] > 0) 
    652644                        [keychain addKeysToAgent]; 
    653  
    654                         [openPanelLock lock]; 
    655                         openPanel = NO; 
    656                         [openPanelLock unlock]; 
    657                 }                
    658645        } 
    659646