Skip to content

Commit

Permalink
[Gate] reduce the size of Json start to optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-rabault committed Mar 22, 2024
1 parent 8ad7fe2 commit f5ca317
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tool_services/gate/TinyJSON/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void Convert_DataToMsg(service_t *service, char *data)
return;
}

json_t const *services = json_getProperty(root, "services");
json_t const *services = json_getProperty(root, "s");
// Get services
if (services != 0)
{
Expand Down Expand Up @@ -731,8 +731,8 @@ void Convert_JsonToMsg(service_t *service, uint16_t id, luos_type_t type, char *
// This function start a Json structure and return the string size.
uint16_t Convert_StartData(char *data)
{
memcpy(data, "{\"services\":{", sizeof("{\"services\":{"));
return (sizeof("{\"services\":{") - 1);
memcpy(data, "{\"s\":{", sizeof("{\"s\":{"));
return (sizeof("{\"s\":{") - 1);
}
// This function start a Service into a Json structure and return the string size.
uint16_t Convert_StartServiceData(char *data, char *alias)
Expand Down

0 comments on commit f5ca317

Please sign in to comment.