aboutsummaryrefslogtreecommitdiff
path: root/lib/http_chunks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-03-04 15:25:06 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-03-04 15:25:06 +0000
commit1eb9fd6c4d93f7adbca00556575751537b4be47a (patch)
treec4d2e4fd82040a7be2e3704565f8fe7035095cb9 /lib/http_chunks.c
parent78e47fbb5c2e2aaebe54d52c30385feae8c78f18 (diff)
use size_t for the data, but keep the protos use ssize_t to better fit
with the existing transfer.c code
Diffstat (limited to 'lib/http_chunks.c')
-rw-r--r--lib/http_chunks.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index 70a48950a..673e8a0fe 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -100,14 +100,17 @@ void Curl_httpchunk_init(struct connectdata *conn)
*/
CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
char *datap,
- ssize_t length,
- ssize_t *wrote)
+ ssize_t datalen,
+ ssize_t *wrotep)
{
CURLcode result=CURLE_OK;
struct Curl_chunker *ch = &conn->proto.http->chunk;
struct Curl_transfer_keeper *k = &conn->keep;
- int piece;
- *wrote = 0; /* nothing yet */
+ size_t piece;
+ size_t length = (size_t)datalen;
+ size_t *wrote = (size_t *)wrotep;
+
+ *wrote = 0; /* nothing's written yet */
while(length) {
switch(ch->state) {
@@ -212,6 +215,7 @@ CHUNKcode Curl_httpchunk_read(struct connectdata *conn,
if(result)
return CHUNKE_WRITE_ERROR;
+
*wrote += piece;
ch->datasize -= piece; /* decrease amount left to expect */