From 880ec76275be3ac9dbe1a05ad91ebf7a75ded01e Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sun, 19 Oct 2025 17:51:47 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3lnppp=20=E5=9B=A0=E8=BF=9B?= =?utf8?q?=E5=85=A5=E5=88=B0=E7=9D=A1=E7=9C=A0=E7=8A=B6=E6=80=81ota?= =?utf8?q?=E4=B8=8B=E8=BD=BD=E5=A4=B1=E8=B4=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/zhihui/leiniao/imsl_ln/ln_api.c | 16 ---------------- code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c b/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c index f3e1142c5..013cc2412 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api.c @@ -404,9 +404,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD] 开始下载: %s -> %s", url, save_path); g_ln_is_file_downloading = 1; - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_add_sleep_veto(PM_ID_DEBUG); - #endif HttpClient client = {0}; HttpClientData client_data = {0}; @@ -418,9 +416,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD] fopen failed for %s", save_path); g_ln_is_file_downloading = 0; - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif return ERRCODE_FAIL; } @@ -430,9 +426,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD] prepare failed: %d", prep); fclose(fd); g_ln_is_file_downloading = 0; - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif return ERRCODE_FAIL; } @@ -444,9 +438,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) fclose(fd); HttpClientUnprepare(&client_data); g_ln_is_file_downloading = 0; - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif return ERRCODE_FAIL; } @@ -459,9 +451,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) HttpClientClse(&client); HttpClientUnprepare(&client_data); g_ln_is_file_downloading = 0; - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif return ERRCODE_FAIL; } @@ -483,9 +473,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) fclose(fd); HttpClientClse(&client); HttpClientUnprepare(&client_data); - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif return ERRCODE_FAIL; } total_written += written; @@ -522,9 +510,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "删除不完整文件成功\r\n"); } - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif } HttpClientUnprepare(&client_data); @@ -532,9 +518,7 @@ int uapi_ln_download_file(const char *url, const char *save_path) fclose(fd); g_ln_is_file_downloading = 0; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[DOWNLOAD] 下载过程结束,ret=%d", ret); - #ifdef SUPPORT_CAT1_SERVICE uapi_pm_remove_sleep_veto(PM_ID_DEBUG); - #endif return ret; } diff --git a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c index c0fb39036..ce867d04f 100644 --- a/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c +++ b/code/sdk/zhihui/leiniao/imsl_ln/ln_api_ota.c @@ -366,9 +366,9 @@ static int ln_download_file_to_path(const char *full_url, const char *save_path, /* CAT1 网络保活处理 */ cat1_api_add_cat1_vote(); cat1_api_disable_cat1_cmd(0); - uapi_pm_add_sleep_veto(PM_ID_DEBUG); LOS_Msleep(500); // 等待模块就绪 #endif + uapi_pm_add_sleep_veto(PM_ID_DEBUG); /* 初始化HTTP客户端(与http_download风格一致) */ HttpClient client = {0}; -- 2.17.1