From: @CHENG <2393524978@qq.com> Date: Wed, 8 May 2024 02:04:01 +0000 (+0800) Subject: hzzy-patch_20240429.rar X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=8be606bc4cd97ffba08c6d2c7a76bf40a2fac41d;p=mirrors%2FASR3603_Z5_DS.git hzzy-patch_20240429.rar --- diff --git a/2.sdk/sdk/gui/lv_watch/modem/gps/mmi_modem_gps_access_net.c b/2.sdk/sdk/gui/lv_watch/modem/gps/mmi_modem_gps_access_net.c index 3d70f62a..c12172fd 100644 --- a/2.sdk/sdk/gui/lv_watch/modem/gps/mmi_modem_gps_access_net.c +++ b/2.sdk/sdk/gui/lv_watch/modem/gps/mmi_modem_gps_access_net.c @@ -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 diff --git a/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_adaptor_nw.c b/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_adaptor_nw.c index 6351d4fb..9a84870d 100644 --- a/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_adaptor_nw.c +++ b/2.sdk/sdk/gui/lv_watch/modem/mmi_modem_adaptor_nw.c @@ -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 @@ -2757,6 +2758,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