projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9659d86
)
Fix Curl_is_connected() even more to deal with waitconnect() return codes
author
Daniel Stenberg
<daniel@haxx.se>
Fri, 14 Feb 2003 09:11:51 +0000
(09:11 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Fri, 14 Feb 2003 09:11:51 +0000
(09:11 +0000)
even better (also based on input from Martin).
lib/connect.c
patch
|
blob
|
history
diff --git
a/lib/connect.c
b/lib/connect.c
index
6e3df66
..
98bdaca
100644
(file)
--- a/
lib/connect.c
+++ b/
lib/connect.c
@@
-144,7
+144,11
@@
int Curl_nonblock(int socket, /* operate on this */
}
/*
- * Return 0 on fine connect, -1 on error and 1 on timeout.
+ * waitconnect() returns:
+ * 0 fine connect
+ * -1 select() error
+ * 1 select() timeout
+ * 2 select() returned with an error condition
*/
static
int waitconnect(int sockfd, /* socket */
@@
-409,7
+413,7
@@
CURLcode Curl_is_connected(struct connectdata *conn,
if(err)
return CURLE_COULDNT_CONNECT;
}
- else if(
2 =
= rc)
+ else if(
1 !
= rc)
return CURLE_COULDNT_CONNECT;
/*