hzzy-patch_20240429.rar
author@CHENG <2393524978@qq.com>
Wed, 8 May 2024 02:04:48 +0000 (10:04 +0800)
committer@CHENG <2393524978@qq.com>
Wed, 8 May 2024 02:04:48 +0000 (10:04 +0800)
2.sdk/sdk/gui/lv_watch/modem/gps/mmi_modem_gps_access_net.c
2.sdk/sdk/gui/lv_watch/modem/mmi_modem_adaptor_nw.c

index 3d70f62..c12172f 100644 (file)
@@ -108,7 +108,7 @@ static void fill_hd_http_opt(struct http_client_list * header, struct http_clien
        http_client_setopt(client, HTTPCLIENT_OPT_HTTPHEADER, header);
 }
 
-static void fill_hc_http_opt(struct http_client_list * header, struct http_client * client, void* priv_date)
+static void fill_hc_http_opt(struct http_client_list ** header, struct http_client * client, void* priv_date)
 {
 #define CONTENT_AUTH_MAX_LEN  128
 
@@ -135,11 +135,11 @@ static void fill_hc_http_opt(struct http_client_list * header, struct http_clien
 
     //printf("content_msg:%s:len=%d\n", content_msg, strlen(content_msg));
     //content_host,content_len, lib will control   
-    header = http_client_list_append(header, content_auth);
-    header = http_client_list_append(header, content_type);
-    header = http_client_list_append(header, content_accept);
+    *header = http_client_list_append(*header, content_auth);
+    *header = http_client_list_append(*header, content_type);
+    *header = http_client_list_append(*header, content_accept);
     
-       http_client_setopt(client, HTTPCLIENT_OPT_HTTPHEADER, header);
+       http_client_setopt(client, HTTPCLIENT_OPT_HTTPHEADER, *header);
 }
 
 void agnsshttp_download_require(char *url, void *priv_date)
@@ -161,7 +161,7 @@ void agnsshttp_download_require(char *url, void *priv_date)
                uos_sleep(2000);
 
         //fill_hd_http_opt(header, client, priv_date);
-               fill_hc_http_opt(header, client, priv_date);
+               fill_hc_http_opt(&header, client, priv_date);
 
         http_client_getinfo(client, HTTPCLIENT_GETINFO_TCP_STATE, &response_code);
         printf("[http]Get tcp state %d\n", response_code);
@@ -201,7 +201,11 @@ void agnsshttp_download_require(char *url, void *priv_date)
         }
         
        }
-       http_client_shutdown(client); /*release http resources*/
+    if (header) {
+        http_client_list_destroy(header);
+        header = NULL;
+    }
+    http_client_shutdown(client); /*release http resources*/
     if (http_ret)
     {
         // TODO: send message to config gnss by uart      
index 18d3b4f..6a83d2b 100644 (file)
@@ -723,6 +723,7 @@ void Ril_MM_Response_Wifi_CellInfo(RIL_Wifi_Cell_Info * pWifiCellInfo)
 
             printf("%s, WifiResultInd: result=%d, count=%d\n", __FUNCTION__, result, g_Wifi.WifiApList.count);
             g_Wifi.WifiResultInd(result, ap_list);
+            Hal_Mem_Free(ap_list);
         }
 
         //cleanup
@@ -2754,6 +2755,7 @@ static void MMI_Modem_Wifi_Timeout_Cb(uint32_t param)
 
         printf("%s, WifiResultInd: result=%d, count=%d\n", __FUNCTION__, result, g_Wifi.WifiApList.count);
         g_Wifi.WifiResultInd(result, ap_list);
+        Hal_Mem_Free(ap_list);
     }
 
     //cleanup