Changeset 39

Show
Ignore:
Timestamp:
04/17/05 19:47:11 (4 years ago)
Author:
kevin
Message:

Fix warnings and error that shows up under Tiger
The error actually should have shown up under Panther, I don't know why it didn't

Files:

Legend:

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

    r28 r39  
    313313        struct sockaddr_un rsa; 
    314314 
    315         int i, used, allocated, ssa, a, hfd, lfd, rfd ,r; 
     315        int i, used, allocated, a, hfd, lfd, rfd ,r; 
     316        socklen_t ssa; 
    316317        int *fds; 
    317318        fd_set rfds; 
     
    383384        hfd = s; 
    384385 
    385         ssa = sizeof(struct sockaddr); 
     386        ssa = (socklen_t) sizeof(struct sockaddr); 
    386387 
    387388        /* Run a select over all available fd's. */ 
  • trunk/Libs/SSHKeychain.h

    r35 r39  
    3535- (BOOL)addKeyWithPath:(NSString *)path; 
    3636 
    37 - (NSMutableArray *)arrayOfPaths; 
     37- (NSArray *)arrayOfPaths; 
    3838- (int)count; 
    3939 
  • trunk/Libs/SSHKeychain.m

    r35 r39  
    253253        int i, ts; 
    254254 
    255         paths = [self arrayOfPaths]; 
     255        paths = [[self arrayOfPaths] mutableCopy]; 
    256256 
    257257        if([self addingKeys]) 
  • trunk/Libs/SSHTool.m

    r28 r39  
    142142        /* Set the launchpath to the path instance variable. */ 
    143143        [task setLaunchPath:toolPath]; 
    144  
    145         if([task launch]) { 
    146                 return YES; 
    147         } 
    148          
    149         return NO; 
     144         
     145        BOOL retValue = YES; 
     146        NS_DURING 
     147                [task launch]; 
     148        NS_HANDLER 
     149                if([[localException name] isEqualToString:NSInvalidArgumentException]) 
     150                { 
     151                        retValue = NO; 
     152                } 
     153                 
     154                else 
     155                { 
     156                        [localException raise]; 
     157                } 
     158        NS_ENDHANDLER 
     159         
     160        return retValue; 
    150161} 
    151162