Curl_pgrsDone: return int and acknowledge return code
Since Curl_pgrsDone() itself calls Curl_pgrsUpdate() which may return an abort instruction or similar we need to return that info back and subsequently properly handle return codes from Curl_pgrsDone() where used. (Spotted by a Coverity scan)
This commit is contained in:
@@ -5379,7 +5379,8 @@ CURLcode Curl_done(struct connectdata **connp,
|
||||
else
|
||||
result = CURLE_OK;
|
||||
|
||||
Curl_pgrsDone(conn); /* done with the operation */
|
||||
if(Curl_pgrsDone(conn) && !result)
|
||||
result = CURLE_ABORTED_BY_CALLBACK;
|
||||
|
||||
/* if the transfer was completed in a paused state there can be buffered
|
||||
data left to write and then kill */
|
||||
|
Reference in New Issue
Block a user