From: penglei <1624952103@qq.com> Date: Wed, 25 Sep 2024 14:30:44 +0000 (+0800) Subject: 优化IPV6 PING TEST X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=c61e67c218786ceb802df08c4af3f04d0818a975;p=mirrors%2FFD230.git 优化IPV6 PING TEST --- diff --git a/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c b/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c index 8a63baff2..2e72bc50f 100644 --- a/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c +++ b/code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c @@ -1626,22 +1626,22 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint return; } - char *hostname = (char *)malloc(len + 1 + 8); - if (hostname == NULL) - { - PRINT("malloc failed\n"); - free(str); - return; - } + // char *hostname = (char *)malloc(len + 1 + 8); + // if (hostname == NULL) + // { + // PRINT("malloc failed\n"); + // free(str); + // return; + // } for (int i = 0; i < len; i++) str[i] = (char)data[i]; str[len] = '\0'; - sprintf(hostname,"www.%s.com",str); - PRINT("hostname : %s\n",hostname); - send_data = OsShellPing(1,hostname); - free(hostname); + // sprintf(hostname,"www.%s.com",str); + // PRINT("hostname : %s\n",hostname); + send_data = OsShellPing(1,str); + // free(hostname); free(str); #endif factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,