Skip to content
Snippets Groups Projects
Commit 617d6eb7 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Update the byte counters in the loop so that aborted transfers have the

information as well. Improves debug outputs etc.
parent 99888388
No related branches found
No related tags found
No related merge requests found
......@@ -839,6 +839,12 @@ Transfer(struct connectdata *c_conn)
break;
}
/* Update read/write counters */
if(conn->bytecountp)
*conn->bytecountp = bytecount; /* read count */
if(conn->writebytecountp)
*conn->writebytecountp = writebytecount; /* write count */
now = Curl_tvnow();
if(Curl_pgrsUpdate(conn))
urg = CURLE_ABORTED_BY_CALLBACK;
......@@ -862,6 +868,7 @@ Transfer(struct connectdata *c_conn)
bytecount, conn->size);
return CURLE_OPERATION_TIMEOUTED;
}
}
}
......@@ -884,11 +891,6 @@ Transfer(struct connectdata *c_conn)
if(Curl_pgrsUpdate(conn))
return CURLE_ABORTED_BY_CALLBACK;
if(conn->bytecountp)
*conn->bytecountp = bytecount; /* read count */
if(conn->writebytecountp)
*conn->writebytecountp = writebytecount; /* write count */
return CURLE_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment