下载限制修改
authorhcj <1224667075@qq.com>
Thu, 18 Dec 2025 11:51:49 +0000 (19:51 +0800)
committerhcj <1224667075@qq.com>
Thu, 18 Dec 2025 11:51:49 +0000 (19:51 +0800)
code/sdk/zhihui/leiniao/imsl_ln/ln_api.c
code/sdk/zhihui/leiniao/imsl_ln/ln_websoket_api_ext.c

index 5ddc9ee..a72e9b2 100644 (file)
@@ -1100,7 +1100,7 @@ void ln_ws_process_message(const ws_data_msg_t *data_msg, ws_command_t type)
         if (data_msg && data_msg->finished) {
             push_story_response_finished_notification(true);
         }
-
+        if(ln_http_download_is_initialized())
         ln_http_download_file(data_msg->audio_url, 100*1000);
 
          break;
@@ -1112,7 +1112,7 @@ void ln_ws_process_message(const ws_data_msg_t *data_msg, ws_command_t type)
         if (data_msg && data_msg->finished) {
             push_story_response_finished_notification(true);
         }
-
+        if(ln_http_download_is_initialized())
         ln_http_download_file(data_msg->audio_url, 100*1000);
 
         break;
index f41f93e..3890cb8 100644 (file)
@@ -213,6 +213,11 @@ int ln_http_download_file(const char *url, uint32_t timeout_ms)
         return -1;
     }
 
+    if (!g_download_service_initialized) {
+        WEARABLE_LOGW(WEARABLE_LOG_MODULE_APP, "[HTTP_DL] Service not initialized");
+        return -1;
+    }
+
     ln_http_download_mail_t mail = {0};
     mail.timeout_ms = timeout_ms;