Merge pull request #36 from HubertXie/master

Update webclient_file.c
master
朱天龙 (Armink) 7 years ago committed by GitHub
commit b5289f3d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -40,7 +40,7 @@ int webclient_get_file(const char* URI, const char* filename)
{ {
int fd = -1, rc = WEBCLIENT_OK; int fd = -1, rc = WEBCLIENT_OK;
size_t offset; size_t offset;
size_t length, total_length = 0; int length, total_length = 0;
unsigned char *ptr = RT_NULL; unsigned char *ptr = RT_NULL;
struct webclient_session* session = RT_NULL; struct webclient_session* session = RT_NULL;
int resp_status = 0; int resp_status = 0;
@ -54,7 +54,7 @@ int webclient_get_file(const char* URI, const char* filename)
if ((resp_status = webclient_get(session, URI)) != 200) if ((resp_status = webclient_get(session, URI)) != 200)
{ {
LOG_E("get file failed, wrong response: %d.", resp_status); LOG_E("get file failed, wrong response: %d (-0x%X).", resp_status, resp_status);
rc = -WEBCLIENT_ERROR; rc = -WEBCLIENT_ERROR;
goto __exit; goto __exit;
} }

Loading…
Cancel
Save