Loading lib/easy.c +11 −11 Original line number Original line Diff line number Diff line Loading @@ -697,14 +697,15 @@ static CURLcode easy_transfer(CURLM *multi) while(!done && !mcode) { while(!done && !mcode) { int still_running = 0; int still_running = 0; int ret; int rc; before = curlx_tvnow(); before = curlx_tvnow(); mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret); mcode = curl_multi_wait(multi, NULL, 0, 1000, &rc); if(mcode == CURLM_OK) { if(!mcode) { if(ret == 0) { if(!rc) { struct timeval after = curlx_tvnow(); struct timeval after = curlx_tvnow(); /* If it returns without any filedescriptor instantly, we need to /* If it returns without any filedescriptor instantly, we need to avoid busy-looping during periods where it has nothing particular avoid busy-looping during periods where it has nothing particular to wait for */ to wait for */ Loading @@ -727,8 +728,7 @@ static CURLcode easy_transfer(CURLM *multi) } } /* only read 'still_running' if curl_multi_perform() return OK */ /* only read 'still_running' if curl_multi_perform() return OK */ if((mcode == CURLM_OK) && !still_running) { if(!mcode && !still_running) { int rc; CURLMsg *msg = curl_multi_info_read(multi, &rc); CURLMsg *msg = curl_multi_info_read(multi, &rc); if(msg) { if(msg) { result = msg->data.result; result = msg->data.result; Loading @@ -739,7 +739,7 @@ static CURLcode easy_transfer(CURLM *multi) /* Make sure to return some kind of error if there was a multi problem */ /* Make sure to return some kind of error if there was a multi problem */ if(mcode) { if(mcode) { return (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY : result = (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY : /* The other multi errors should never happen, so return /* The other multi errors should never happen, so return something suitably generic */ something suitably generic */ CURLE_BAD_FUNCTION_ARGUMENT; CURLE_BAD_FUNCTION_ARGUMENT; Loading Loading
lib/easy.c +11 −11 Original line number Original line Diff line number Diff line Loading @@ -697,14 +697,15 @@ static CURLcode easy_transfer(CURLM *multi) while(!done && !mcode) { while(!done && !mcode) { int still_running = 0; int still_running = 0; int ret; int rc; before = curlx_tvnow(); before = curlx_tvnow(); mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret); mcode = curl_multi_wait(multi, NULL, 0, 1000, &rc); if(mcode == CURLM_OK) { if(!mcode) { if(ret == 0) { if(!rc) { struct timeval after = curlx_tvnow(); struct timeval after = curlx_tvnow(); /* If it returns without any filedescriptor instantly, we need to /* If it returns without any filedescriptor instantly, we need to avoid busy-looping during periods where it has nothing particular avoid busy-looping during periods where it has nothing particular to wait for */ to wait for */ Loading @@ -727,8 +728,7 @@ static CURLcode easy_transfer(CURLM *multi) } } /* only read 'still_running' if curl_multi_perform() return OK */ /* only read 'still_running' if curl_multi_perform() return OK */ if((mcode == CURLM_OK) && !still_running) { if(!mcode && !still_running) { int rc; CURLMsg *msg = curl_multi_info_read(multi, &rc); CURLMsg *msg = curl_multi_info_read(multi, &rc); if(msg) { if(msg) { result = msg->data.result; result = msg->data.result; Loading @@ -739,7 +739,7 @@ static CURLcode easy_transfer(CURLM *multi) /* Make sure to return some kind of error if there was a multi problem */ /* Make sure to return some kind of error if there was a multi problem */ if(mcode) { if(mcode) { return (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY : result = (mcode == CURLM_OUT_OF_MEMORY) ? CURLE_OUT_OF_MEMORY : /* The other multi errors should never happen, so return /* The other multi errors should never happen, so return something suitably generic */ something suitably generic */ CURLE_BAD_FUNCTION_ARGUMENT; CURLE_BAD_FUNCTION_ARGUMENT; Loading