Changeset 9a09212 in mainline for uspace/app/download/main.c


Ignore:
Timestamp:
2017-12-04T20:22:45Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
82d515e9
Parents:
0fb1755
Message:

Libhttp should not mix error codes and number of bytes transferred.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/download/main.c

    r0fb1755 r9a09212  
    224224                }
    225225               
    226                 int body_size;
    227                 while ((body_size = recv_buffer(&http->recv_buffer, buf, buf_size)) > 0) {
     226                size_t body_size;
     227                while ((rc = recv_buffer(&http->recv_buffer, buf, buf_size, &body_size)) == EOK && body_size > 0) {
    228228                        fwrite(buf, 1, body_size, ofile != NULL ? ofile : stdout);
    229229                }
Note: See TracChangeset for help on using the changeset viewer.