From e806c1701bad945312600e0b7ebe3ff124561224 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Thu, 21 Aug 2025 16:30:58 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../peripheral/worksync/service/worksync_tcp_server.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/sdk/drivers/peripheral/worksync/service/worksync_tcp_server.c b/code/sdk/drivers/peripheral/worksync/service/worksync_tcp_server.c index 3d19de9d7..b2107e84b 100644 --- a/code/sdk/drivers/peripheral/worksync/service/worksync_tcp_server.c +++ b/code/sdk/drivers/peripheral/worksync/service/worksync_tcp_server.c @@ -732,7 +732,6 @@ void tcp_recv_worksync_data_handler(const char *input, int input_len) // 解析 worksync_data.isBind = isBind->valueint; printf("isBind: %d\n", worksync_data.isBind); printf("check_in,report success\n"); - } if (requestKey && deviceId) // 设备注册 @@ -1597,7 +1596,7 @@ int worksync_tcp_Operation(OperationType type) // 发送数据 goto FAILED; } } - printf("imei:%s",imei); + printf("imei:%s", imei); temp_len += snprintf(json_data + temp_len, 512 - temp_len, "{\"appId\":\"%s\",", APP_ID); temp_len += snprintf(json_data + temp_len, 512 - temp_len, @@ -1715,8 +1714,10 @@ int worksync_tcp_Operation(OperationType type) // 发送数据 if (steps == NULL) steps = "0"; #if defined(SUPPORT_GNSS) - if (geo_data == NULL) - geo_data = "0,0"; + if (geo_data[0] == '\0') + { + strcpy(geo_data, "0,0"); + } #endif temp_len += snprintf(json_data + temp_len, 512 - temp_len, -- 2.17.1