mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:33:32 +03:00
Gisle Vanem's fixes to use CURL_SOCKET_BAD more instead of -1 for sockets.
This commit is contained in:
parent
326e8b9fc1
commit
e545e33d5f
7 changed files with 24 additions and 21 deletions
|
|
@ -417,6 +417,7 @@ static bool verifyconnect(curl_socket_t sockfd)
|
|||
/* This wasn't a successful connect */
|
||||
return FALSE;
|
||||
#else
|
||||
(void)sockfd;
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -571,7 +572,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
|||
*/
|
||||
for (ai = remotehost->addr; ai; ai = ai->ai_next, aliasindex++) {
|
||||
sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
|
||||
if (sockfd < 0)
|
||||
if (sockfd == CURL_SOCKET_BAD)
|
||||
continue;
|
||||
#else
|
||||
/*
|
||||
|
|
@ -681,7 +682,7 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
|
|||
}
|
||||
before = after;
|
||||
}
|
||||
if (sockfd < 0) {
|
||||
if (sockfd == CURL_SOCKET_BAD) {
|
||||
/* no good connect was made */
|
||||
*sockconn = -1;
|
||||
failf(data, "Connect failed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue