优化IPV6 PING TEST
authorpenglei <1624952103@qq.com>
Wed, 25 Sep 2024 14:30:44 +0000 (22:30 +0800)
committerpenglei <1624952103@qq.com>
Wed, 25 Sep 2024 14:30:44 +0000 (22:30 +0800)
code/sdk/application/wearable/service/factorytest_service/factorytest_protocol.c

index 8a63baf..2e72bc5 100644 (file)
@@ -1626,22 +1626,22 @@ void factorytest_protocol_soft_test_decode(uint8_t submode,uint8_t testitem,uint
                     return;\r
                 }\r
 \r
-                char *hostname = (char *)malloc(len + 1 + 8);\r
-                if (hostname == NULL) \r
-                {\r
-                    PRINT("malloc failed\n");\r
-                    free(str);\r
-                    return;\r
-                }\r
+                // char *hostname = (char *)malloc(len + 1 + 8);\r
+                // if (hostname == NULL) \r
+                // {\r
+                //     PRINT("malloc failed\n");\r
+                //     free(str);\r
+                //     return;\r
+                // }\r
 \r
                 for (int i = 0; i < len; i++) \r
                     str[i] = (char)data[i];\r
                 str[len] = '\0';\r
 \r
-                sprintf(hostname,"www.%s.com",str);\r
-                PRINT("hostname : %s\n",hostname);\r
-                send_data = OsShellPing(1,hostname);\r
-                free(hostname);\r
+                // sprintf(hostname,"www.%s.com",str);\r
+                // PRINT("hostname : %s\n",hostname);\r
+                send_data = OsShellPing(1,str);\r
+                // free(hostname);\r
                 free(str);\r
 #endif\r
                 factorytest_protocol_replymsg(BLE_TEST_CMD_MODE_SOFT_TEST,\r