TSG-13878 tsg-service-chaining-engine支持fieldstat2
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user