diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2004-03-11 13:13:35 +0000 | 
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2004-03-11 13:13:35 +0000 | 
| commit | e545e33d5fd4f021220f09cf8fb05c66db2a4bf4 (patch) | |
| tree | 0330232d9a4b0a572b066776f2615a770dcb355d /lib/transfer.c | |
| parent | 326e8b9fc1e6bc3b83c09ecaea96f10a403edcf5 (diff) | |
Gisle Vanem's fixes to use CURL_SOCKET_BAD more instead of -1 for sockets.
Diffstat (limited to 'lib/transfer.c')
| -rw-r--r-- | lib/transfer.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/lib/transfer.c b/lib/transfer.c index 16ed596f1..cc13a6c42 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1312,13 +1312,13 @@ CURLcode Curl_readwrite_init(struct connectdata *conn)    if(conn->bits.getheader || !data->set.no_body) {      FD_ZERO (&k->readfd);               /* clear it */ -    if(conn->sockfd != -1) { +    if(conn->sockfd != CURL_SOCKET_BAD) {        FD_SET (conn->sockfd, &k->readfd); /* read socket */        k->keepon |= KEEP_READ;      }      FD_ZERO (&k->writefd);              /* clear it */ -    if(conn->writesockfd != -1) { +    if(conn->writesockfd != CURL_SOCKET_BAD) {        /* HTTP 1.1 magic:           Even if we require a 100-return code before uploading data, we might @@ -1408,7 +1408,7 @@ Transfer(struct connectdata *conn)         is different*/      Curl_readwrite_init(conn); -  if((conn->sockfd == -1) && (conn->writesockfd == -1)) +  if((conn->sockfd == CURL_SOCKET_BAD) && (conn->writesockfd == CURL_SOCKET_BAD))      /* nothing to read, nothing to write, we're already OK! */      return CURLE_OK; @@ -1953,11 +1953,11 @@ CURLcode Curl_perform(struct SessionHandle *data)             * possibly know if the connection is in a good shape or not now. */            conn->bits.close = TRUE; -          if(-1 != conn->sock[SECONDARYSOCKET]) { +          if(CURL_SOCKET_BAD != conn->sock[SECONDARYSOCKET]) {              /* if we failed anywhere, we must clean up the secondary socket if                 it was used */              sclose(conn->sock[SECONDARYSOCKET]); -            conn->sock[SECONDARYSOCKET]=-1; +            conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;            }          } | 
