Changeset 14415


Ignore:
Timestamp:
03/04/12 19:46:56 (12 years ago)
Author:
nit
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/sock.h

    r14407 r14415  
    143143int sockportopen(int *fd, char* ip, int port, int tout)
    144144{
    145         sockclose(fd);
    146145        int ret = 0, rest = 0, optval;
    147146        socklen_t optlen = sizeof(optval);
    148147        struct timeval timeout;
    149148        struct sockaddr_in cliaddr;
     149       
     150        if(ip == NULL) return 1;
     151        sockclose(fd);
    150152
    151153        memset(&cliaddr, 0, sizeof(struct sockaddr_in));
Note: See TracChangeset for help on using the changeset viewer.