fieldstat增加对控制报文类型的计数

This commit is contained in:
luwenpeng
2023-02-23 18:15:21 +08:00
parent ecb9241ce9
commit 679ee1be9c
5 changed files with 112 additions and 34 deletions

View File

@@ -6,13 +6,13 @@
#include "utils.h"
#include "ctrl_packet.h"
static const char *session_state_to_string(enum session_state state)
const char *session_state_to_string(enum session_state state)
{
switch (state)
{
case SESSION_STATE_OPENING:
return "opening";
case SESSION_STATE_CLONING:
case SESSION_STATE_CLOSING:
return "closing";
case SESSION_STATE_ACTIVE:
return "active";
@@ -80,7 +80,7 @@ int ctrl_packet_parser_parse(struct ctrl_pkt_parser *handler, const char *data,
}
else if (strcasecmp(item->valuestring, "closing") == 0)
{
handler->state = SESSION_STATE_CLONING;
handler->state = SESSION_STATE_CLOSING;
}
else if (strcasecmp(item->valuestring, "resetall") == 0)
{