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
This commit is contained in:
parent
0a5a47addf
commit
3d5818a901
|
@ -44,6 +44,13 @@ enum fsm_evt {
|
||||||
EV_N_CONNECT, /* made a successful connection */
|
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 */
|
/* Disconnected state */
|
||||||
static void fsm_disc_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
static void fsm_disc_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data)
|
||||||
{
|
{
|
||||||
|
@ -112,6 +119,7 @@ static struct osmo_fsm fsm = {
|
||||||
.num_states = ARRAY_SIZE(fsm_states),
|
.num_states = ARRAY_SIZE(fsm_states),
|
||||||
.log_subsys = DMSC,
|
.log_subsys = DMSC,
|
||||||
.timer_cb = fsm_reset_ack_timeout_cb,
|
.timer_cb = fsm_reset_ack_timeout_cb,
|
||||||
|
.event_names = fsm_event_names,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Create and start state machine which handles the reset/reset-ack procedure */
|
/* Create and start state machine which handles the reset/reset-ack procedure */
|
||||||
|
|
Loading…
Reference in New Issue