X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fselect.c;h=1c6481cb75a45967e9fcbc15acf483350685ad59;hb=df4392d06fac8fead7a2cbde19684f54c580af68;hp=da3082dda8231983abdadd55ec91f82590a8cb54;hpb=867eb33477c07331e7b58302119308d02a02ee01;p=platform%2Fupstream%2Fcurl.git diff --git a/lib/select.c b/lib/select.c index da3082d..1c6481c 100644 --- a/lib/select.c +++ b/lib/select.c @@ -39,6 +39,10 @@ #include /* delay() */ #endif +#ifdef __VXWORKS__ +#include /* bzero() in FD_SET */ +#endif + #include #include "urldata.h" @@ -108,8 +112,10 @@ int Curl_wait_ms(int timeout_ms) if(error && error_not_EINTR) break; pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) + if(pending_ms <= 0) { + r = 0; /* Simulate a "call timed out" case */ break; + } } while(r == -1); #endif /* USE_WINSOCK */ if(r) @@ -432,8 +438,10 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) break; if(timeout_ms > 0) { pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) + if(pending_ms <= 0) { + r = 0; /* Simulate a "call timed out" case */ break; + } } } while(r == -1); @@ -517,8 +525,10 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) break; if(timeout_ms > 0) { pending_ms = timeout_ms - elapsed_ms; - if(pending_ms <= 0) + if(pending_ms <= 0) { + r = 0; /* Simulate a "call timed out" case */ break; + } } } while(r == -1);