Changeset 132ab5d1 in mainline for uspace/app/download/main.c
- Timestamp:
- 2018-01-30T03:20:45Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5a6cc679
- Parents:
- 8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
uspace/app/download/main.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/download/main.c
r8bfb163 r132ab5d1 74 74 http_t *http = NULL; 75 75 int rc; 76 int ret; 76 77 77 78 if (argc < 2) { … … 155 156 } 156 157 } else { 157 r c= asprintf(&server_path, "%s?%s", path, uri->query);158 if (r c< 0) {158 ret = asprintf(&server_path, "%s?%s", path, uri->query); 159 if (ret < 0) { 159 160 fprintf(stderr, "Failed allocating path\n"); 160 161 rc = ENOMEM; … … 224 225 } 225 226 226 int body_size;227 while (( body_size = recv_buffer(&http->recv_buffer, buf, buf_size))> 0) {227 size_t body_size; 228 while ((rc = recv_buffer(&http->recv_buffer, buf, buf_size, &body_size)) == EOK && body_size > 0) { 228 229 fwrite(buf, 1, body_size, ofile != NULL ? ofile : stdout); 229 230 } 230 231 231 if ( body_size != 0) {232 fprintf(stderr, "Failed receiving body: %s", str_error( body_size));232 if (rc != EOK) { 233 fprintf(stderr, "Failed receiving body: %s", str_error(rc)); 233 234 } 234 235 }
Note:
See TracChangeset
for help on using the changeset viewer.
