[PATCH] osmo-mgw[master]: mgcp_client_fsm: Add FSM event names

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Feb 26 13:36:50 UTC 2018


Review at  https://gerrit.osmocom.org/6937

mgcp_client_fsm: Add FSM event names

The FSM lacks a proper definition of the FSM event names. This causes
problems when inspecting the FSM using the VTY.

- Add proper FSM Event names

Change-Id: Ic0990abea2e9fd92546e7b337b5ff3d6f0866321
Related: OS#2924
---
M src/libosmo-mgcp-client/mgcp_client_fsm.c
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/37/6937/1

diff --git a/src/libosmo-mgcp-client/mgcp_client_fsm.c b/src/libosmo-mgcp-client/mgcp_client_fsm.c
index a2565e7..7ba72ce 100644
--- a/src/libosmo-mgcp-client/mgcp_client_fsm.c
+++ b/src/libosmo-mgcp-client/mgcp_client_fsm.c
@@ -94,6 +94,16 @@
 	EV_DLCX_RESP,
 };
 
+static const struct value_string fsm_mgcp_client_evt_names[] = {
+	{EV_CRCX, "EV_CRCX"},
+	{EV_CRCX_RESP, "EV_CRCX_RESP"},
+	{EV_MDCX, "EV_MDCX"},
+	{EV_MDCX_RESP, "EV_MDCX_RESP"},
+	{EV_DLCX, "EV_DLCX"},
+	{EV_DLCX_RESP, "EV_DLCX_RESP"},
+	{0, NULL}
+};
+
 static struct msgb *make_crcx_msg_bind(struct mgcp_ctx *mgcp_ctx)
 {
 	struct mgcp_msg mgcp_msg;
@@ -533,6 +543,7 @@
 	.num_states = ARRAY_SIZE(fsm_mgcp_client_states),
 	.timer_cb = fsm_timeout_cb,
 	.cleanup = fsm_cleanup_cb,
+	.event_names = fsm_mgcp_client_evt_names,
 };
 
 /*! allocate FSM, and create a new connection on the MGW.

-- 
To view, visit https://gerrit.osmocom.org/6937
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0990abea2e9fd92546e7b337b5ff3d6f0866321
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list