Просмотр исходного кода

Merge pull request #36 from HubertXie/master

Update webclient_file.c
朱天龙 (Armink) 7 лет назад
Родитель
Сommit
b5289f3d6e
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/webclient_file.c

+ 2 - 2
src/webclient_file.c

@@ -40,7 +40,7 @@ int webclient_get_file(const char* URI, const char* filename)
 {
     int fd = -1, rc = WEBCLIENT_OK;
     size_t offset;
-    size_t length, total_length = 0;
+    int length, total_length = 0;
     unsigned char *ptr = RT_NULL;
     struct webclient_session* session = RT_NULL;
     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)
     {
-        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;
         goto __exit;
     }