Loading lib/hostip.c +64 −64 Original line number Diff line number Diff line Loading @@ -564,12 +564,15 @@ int Curl_resolv_timeout(struct connectdata *conn, else timeout = timeoutms; if(timeout && timeout < 1000) if(!timeout) /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */ return Curl_resolv(conn, hostname, port, entry); if(timeout < 1000) /* The alarm() function only provides integer second resolution, so if we want to wait less than one second we must bail out already now. */ return CURLRESOLV_TIMEDOUT; if (timeout > 0) { /************************************************************* * Set signal handler to catch SIGALRM * Store the old value to be able to set it back later! Loading Loading @@ -608,7 +611,6 @@ int Curl_resolv_timeout(struct connectdata *conn, rc = CURLRESOLV_ERROR; goto clean_up; } } #else #ifndef CURLRES_ASYNCH Loading @@ -627,7 +629,6 @@ int Curl_resolv_timeout(struct connectdata *conn, #ifdef USE_ALARM_TIMEOUT clean_up: if (timeout > 0) { if(!prev_alarm) /* deactivate a possibly active alarm before uninstalling the handler */ alarm(0); Loading Loading @@ -667,7 +668,6 @@ clean_up: else alarm((unsigned int)alarm_set); } } #endif /* USE_ALARM_TIMEOUT */ return rc; Loading Loading
lib/hostip.c +64 −64 Original line number Diff line number Diff line Loading @@ -564,12 +564,15 @@ int Curl_resolv_timeout(struct connectdata *conn, else timeout = timeoutms; if(timeout && timeout < 1000) if(!timeout) /* USE_ALARM_TIMEOUT defined, but no timeout actually requested */ return Curl_resolv(conn, hostname, port, entry); if(timeout < 1000) /* The alarm() function only provides integer second resolution, so if we want to wait less than one second we must bail out already now. */ return CURLRESOLV_TIMEDOUT; if (timeout > 0) { /************************************************************* * Set signal handler to catch SIGALRM * Store the old value to be able to set it back later! Loading Loading @@ -608,7 +611,6 @@ int Curl_resolv_timeout(struct connectdata *conn, rc = CURLRESOLV_ERROR; goto clean_up; } } #else #ifndef CURLRES_ASYNCH Loading @@ -627,7 +629,6 @@ int Curl_resolv_timeout(struct connectdata *conn, #ifdef USE_ALARM_TIMEOUT clean_up: if (timeout > 0) { if(!prev_alarm) /* deactivate a possibly active alarm before uninstalling the handler */ alarm(0); Loading Loading @@ -667,7 +668,6 @@ clean_up: else alarm((unsigned int)alarm_set); } } #endif /* USE_ALARM_TIMEOUT */ return rc; Loading