aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-04-19 20:16:28 +0000
committerYang Tse <yangsita@gmail.com>2007-04-19 20:16:28 +0000
commitb0e909329e63f7d4a6f50f536c41082ba8c1619d (patch)
tree9232e1c851dacbdc621559abfa526db5a9e901f4
parentae3d5949b8611fd21d5397608bfd34d675156fad (diff)
fix comment and line spacing
-rw-r--r--lib/connect.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/connect.c b/lib/connect.c
index dd67638ff..57e203657 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -432,16 +432,15 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
#endif
- if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
- (void *)&err, &errSize))
+ if (0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize))
err = SOCKERRNO;
-
#ifdef _WIN32_WCE
- /* Always returns this error, bug in CE? */
- if(WSAENOPROTOOPT==err)
- err=0;
+ /* Old WinCE versions don't support SO_ERROR */
+ if (WSAENOPROTOOPT == err) {
+ SET_SOCKERRNO(0);
+ err = 0;
+ }
#endif
-
if ((0 == err) || (EISCONN == err))
/* we are connected, awesome! */
rc = TRUE;