diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-02-12 04:36:45 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-02-12 04:36:45 +0000 |
commit | 88a88f609f2bd14122d0306a6509ebd539a52217 (patch) | |
tree | c93bb885f433f8b3e25857303ebda73133f53300 /socket.c | |
parent | 48832b032344d1d2ec92ce07b052b8ab096ee57a (diff) | |
download | fetchmail-88a88f609f2bd14122d0306a6509ebd539a52217.tar.gz fetchmail-88a88f609f2bd14122d0306a6509ebd539a52217.tar.bz2 fetchmail-88a88f609f2bd14122d0306a6509ebd539a52217.zip |
Don't go through elaborate shutdown just after connect.
svn path=/trunk/; revision=2739
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -163,7 +163,7 @@ int SockOpen(const char *host, const char *service, const char *options, } if (connect(i, (struct sockaddr *) ai->ai_addr, ai->ai_addrlen) < 0) { freeaddrinfo(ai); - SockClose(i); + close(i); /* don't use SockClose, no traffic yet */ return -1; } #endif @@ -226,7 +226,7 @@ int SockOpen(const char *host, int clientPort, const char *options, if (connect(sock, (struct sockaddr *) &ad, sizeof(ad)) < 0) { int olderr = errno; - SockClose(sock); + close(sock); /* don't use SockClose, no traffic yet */ h_errno = 0; errno = olderr; return -1; @@ -272,14 +272,14 @@ int SockOpen(const char *host, int clientPort, const char *options, memcpy(&ad.sin_addr, *pptr, sizeof(struct in_addr)); if (connect(sock, (struct sockaddr *) &ad, sizeof(ad)) == 0) break; /* success */ - SockClose(sock); + close(sock); /* don't use SockClose, no traffic yet */ memset(&ad, 0, sizeof(ad)); ad.sin_family = AF_INET; } if(*pptr == NULL) { int olderr = errno; - SockClose(sock); + close(sock); /* don't use SockClose, no traffic yet */ h_errno = 0; errno = olderr; return -1; |