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

msc_mgcp: Add FSM event names

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

- Add proper FSM Event names

Closes: OS#2924

Change-Id: I6823756a63b08a71e5518130e49751aa073dbcd2
---
M src/libmsc/msc_mgcp.c
1 file changed, 13 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/47/6947/1

diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 2bc186e..2c8eaa3 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -134,6 +134,18 @@
        EV_DLCX_ALL_RESP,
 };
 
+static const struct value_string msc_mgcp_fsm_evt_names[] = {
+       {EV_INIT, "EV_INIT"},
+       {EV_ASSIGN, "EV_ASSIGN"},
+       {EV_CONNECT, "EV_CONNECT"},
+       {EV_TEARDOWN, "EV_TEARDOWN"},
+       {EV_TEARDOWN_ERROR, "EV_TEARDOWN_ERROR"},
+       {EV_CRCX_RAN_RESP, "EV_CRCX_RAN_RESP"},
+       {EV_CRCX_CN_RESP, "EV_CRCX_CN_RESP"},
+       {EV_DLCX_ALL_RESP, "EV_DLCX_ALL_RESP"},
+       {0, NULL}
+};
+
 /* A general error handler function. On error we still have an interest to
  * remove a half open connection (if possible). This function will execute
  * a controlled jump to the DLCX phase. From there, the FSM will then just
@@ -860,6 +872,7 @@
        .num_states = ARRAY_SIZE(fsm_msc_mgcp_states),
        .log_subsys = DMGCP,
        .timer_cb = fsm_timeout_cb,
+       .event_names = msc_mgcp_fsm_evt_names,
 };
 
 /* Notify that a new call begins. This will create a connection for the

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6823756a63b08a71e5518130e49751aa073dbcd2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: dexter <[email protected]>

Reply via email to