aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 5d464acbd..c61301ad2 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -156,6 +156,7 @@ int Curl_nonblock(curl_socket_t sockfd, /* operate on this */
/* Windows? */
unsigned long flags;
flags = nonblock;
+
return ioctlsocket(sockfd, FIONBIO, &flags);
#define SETBLOCK 3
#endif
@@ -406,13 +407,25 @@ static bool verifyconnect(curl_socket_t sockfd, int *error)
*
* Someone got to verify this on Win-NT 4.0, 2000."
*/
+
+#ifdef _WIN32_WCE
+ Sleep(0);
+#else
SleepEx(0, FALSE);
#endif
+#endif
+
if( -1 == getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
(void *)&err, &errSize))
err = Curl_ourerrno();
+#ifdef _WIN32_WCE
+ /* Always returns this error, bug in CE? */
+ if(WSAENOPROTOOPT==err)
+ err=0;
+#endif
+
if ((0 == err) || (EISCONN == err))
/* we are connected, awesome! */
rc = TRUE;