Ver Fonte

fix: 启用fota是http库编译失败

Wendal Chen há 2 anos atrás
pai
commit
bc93ff4a82
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      components/network/libhttp/luat_http_client.c

+ 1 - 1
components/network/libhttp/luat_http_client.c

@@ -221,11 +221,11 @@ static int on_complete(http_parser* parser, luat_http_ctrl_t *http_ctrl){
 	// http_ctrl->body[http_ctrl->body_len] = 0x00;
 	LLOGD("status_code:%d",parser->status_code);
 	// LLOGD("content_length:%lld",parser->content_length);
+	(void)parser;
 	if (http_ctrl->fd != NULL) {
 		luat_fs_fclose(http_ctrl->fd);
 		http_ctrl->fd = NULL;
 	}
-	(void)parser;
 #ifdef LUAT_USE_FOTA
 	else if(http_ctrl->isfota){
 		if (parser->status_code == 200 || parser->status_code == 206){