TSG-13878 tsg-service-chaining-engine支持fieldstat2

This commit is contained in:
luwenpeng
2023-02-21 09:58:31 +08:00
parent b1abe96b06
commit 823490bcd1
20 changed files with 555 additions and 204 deletions

View File

@@ -1,4 +1,5 @@
#include <string.h>
#include <stdlib.h>
#include <cjson/cJSON.h>
#include "log.h"
@@ -54,12 +55,12 @@ int ctrl_packet_parser_parse(struct ctrl_pkt_parser *handler, const char *data,
// session_id
item = cJSON_GetObjectItem(json, "session_id");
if (!item || !cJSON_IsNumber(item))
if (!item || !cJSON_IsString(item))
{
LOG_ERROR("%s: unexpected control packet: (invalid session_id format) %s", LOG_TAG_CTRLPKT, data);
goto error_out;
}
handler->session_id = item->valueint;
handler->session_id = atoll(item->valuestring);
// state
item = cJSON_GetObjectItem(json, "state");