From 40107d3a8cdeb4d260d9aca5ad7fa6e2874f466f Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Wed, 8 May 2024 21:35:08 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96OTA=E4=B8=8B=E8=BD=BD=E6=B5=81?= =?utf8?q?=E7=A8=8B=EF=BC=8C=E5=85=88=E5=85=B3=E9=97=AD=E6=96=87=E4=BB=B6?= =?utf8?q?=E5=86=8D=E6=89=A7=E8=A1=8Ccallback=EF=BC=8C=E5=8A=A0=E5=BF=AB?= =?utf8?q?=E4=B8=8B=E8=BD=BD=E5=93=8D=E5=BA=94=E9=80=9F=E5=BA=A6=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/system/src/Systemupgrade.cpp | 4 ++-- .../third_party/lwip/src/apps/http/http_client.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/Systemupgrade.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/Systemupgrade.cpp index 31ac4b0c0..4cd929972 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/Systemupgrade.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/Systemupgrade.cpp @@ -182,7 +182,7 @@ namespace OHOS static void upgrade_task(void *arg) { - msleep(3000); + // msleep(3000); //uapi_tcxo_delay_ms(3000); @@ -289,7 +289,7 @@ namespace OHOS static void upgrade_task_fwpkg(void *arg) { - msleep(3000); + // msleep(3000); FILE * fp = fopen(Path_ota_package,"rb"); if(fp!=NULL) { diff --git a/code/sdk/open_source/openharmony/third_party/lwip/src/apps/http/http_client.c b/code/sdk/open_source/openharmony/third_party/lwip/src/apps/http/http_client.c index 527c14b82..2891ef1a9 100644 --- a/code/sdk/open_source/openharmony/third_party/lwip/src/apps/http/http_client.c +++ b/code/sdk/open_source/openharmony/third_party/lwip/src/apps/http/http_client.c @@ -821,10 +821,6 @@ static void httpc_fs_free(httpc_filestate_t *filestate) { if (filestate != NULL) { - if (filestate->file != NULL) { - fclose(filestate->file); - filestate->file = NULL; - } mem_free(filestate); } } @@ -836,6 +832,10 @@ httpc_fs_result(void *arg, httpc_result_t httpc_result, u32_t rx_content_len, { httpc_filestate_t *filestate = (httpc_filestate_t *)arg; if (filestate != NULL) { + if (filestate->file != NULL) { + fclose(filestate->file); + filestate->file = NULL; + } if (filestate->client_settings->result_fn != NULL) { filestate->client_settings->result_fn(filestate->callback_arg, httpc_result, rx_content_len, srv_res, err); -- 2.17.1