diff options
| author | wangmenglan <[email protected]> | 2023-05-09 12:07:48 +0800 |
|---|---|---|
| committer | wangmenglan <[email protected]> | 2023-05-09 14:23:39 +0800 |
| commit | ceffc9b16837a592a6cbbe570f9d6fe826eb0686 (patch) | |
| tree | d38f1406bca5bd945623411a9e0d90cf4c82e556 /common/src/tfe_mpack.cpp | |
| parent | 7c3b77fb2f8de60a93a6ae2ef1c36d1e6646dbce (diff) | |
TSG-14930 TFE支持发送控制报文给SAPP
Diffstat (limited to 'common/src/tfe_mpack.cpp')
| -rw-r--r-- | common/src/tfe_mpack.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/src/tfe_mpack.cpp b/common/src/tfe_mpack.cpp index 06c3028..e7f2893 100644 --- a/common/src/tfe_mpack.cpp +++ b/common/src/tfe_mpack.cpp @@ -245,6 +245,7 @@ int parse_messagepack(const char* data, size_t length, void *ctx) if (strncasecmp(buff, "opening", sizeof(buff)) == 0) { handler->state = SESSION_STATE_OPENING; + goto succ; } else if (strncasecmp(buff, "active", sizeof(buff)) == 0) { @@ -253,10 +254,12 @@ int parse_messagepack(const char* data, size_t length, void *ctx) else if (strncasecmp(buff, "closing", sizeof(buff)) == 0) { handler->state = SESSION_STATE_CLOSING; + goto succ; } else if (strncasecmp(buff, "resetall", sizeof(buff)) == 0) { handler->state = SESSION_STATE_RESETALL; + goto succ; } else { @@ -303,8 +306,11 @@ int parse_messagepack(const char* data, size_t length, void *ctx) TFE_LOG_ERROR(g_default_logger, "%s: unexpected control packet: (proxy no found)", LOG_TAG_CTRLPKT); goto error; } + proxy_map = mpack_node_map_cstr(params, "proxy"); proxy_parse_messagepack(proxy_map, handler); + +succ: mpack_tree_destroy(&tree); return 0; error: |
