diff options
author | Daniel Stenberg <daniel@haxx.se> | 2001-11-01 12:18:53 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2001-11-01 12:18:53 +0000 |
commit | 617d6eb7ce103d796bf2873ba44992b93773ccdd (patch) | |
tree | 56f3f411878e5b1c964add55161f9d2550582fdd | |
parent | 99888388dcba87a859740867b7c48fc7dfa68e96 (diff) |
Update the byte counters in the loop so that aborted transfers have the
information as well. Improves debug outputs etc.
-rw-r--r-- | lib/transfer.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 01785f691..28fbf702d 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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; } |