修复编译bug 2120/1 2120/head 2123/target/1 2128/target/1
authorxue <2144439972@qq.com>
Thu, 21 Aug 2025 08:30:58 +0000 (16:30 +0800)
committerxue <2144439972@qq.com>
Thu, 21 Aug 2025 08:30:58 +0000 (16:30 +0800)
code/sdk/drivers/peripheral/worksync/service/worksync_tcp_server.c

index 3d19de9..b2107e8 100644 (file)
@@ -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,