[PATCH] osmo-bsc[master]: a_reset: Add FSM event names

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


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

a_reset: 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: Ief1eff45a896d6191bdc64c232be69e85bfc63dc
Related: OS#2924
---
M src/libbsc/a_reset.c
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/52/6952/1

diff --git a/src/libbsc/a_reset.c b/src/libbsc/a_reset.c
index 797f8e5..1fccc5f 100644
--- a/src/libbsc/a_reset.c
+++ b/src/libbsc/a_reset.c
@@ -44,6 +44,13 @@
 	EV_N_CONNECT,		/* made a successful connection */
 };
 
+static const struct value_string fsm_event_names[] = {
+	OSMO_VALUE_STRING(EV_RESET_ACK),
+	OSMO_VALUE_STRING(EV_N_DISCONNECT),
+	OSMO_VALUE_STRING(EV_N_CONNECT),
+	{0, NULL}
+};
+
 /* Disconnected state */
 static void fsm_disc_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
 {
@@ -112,6 +119,7 @@
 	.num_states = ARRAY_SIZE(fsm_states),
 	.log_subsys = DMSC,
 	.timer_cb = fsm_reset_ack_timeout_cb,
+	.event_names = fsm_event_names,
 };
 
 /* Create and start state machine which handles the reset/reset-ack procedure */

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

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


More information about the gerrit-log mailing list