From 2dbf5d0c33189b2da3a6a02aa1791208232b559f Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Wed, 25 Sep 2024 22:30:44 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96IPV6=20PING=20TEST?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../factorytest_protocol.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) 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, -- 2.17.1