소스 검색

Merge pull request #36 from HubertXie/master

Update webclient_file.c
朱天龙 (Armink) 7 년 전
부모
커밋
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;
     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;
     }
     }