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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/4376 osmo-bsc MGCP FSM: catch all unexpected events Change the error handling for some event handlers to bail on all but the expected successful event. For once this catches any event that might come along unexpectedly (though the FSM code already thwarts unallowed events), and also it fits the fsm-to-dot.py script's magic to interpret the last mentioned event as a state transition cause. Change-Id: I2aea11c476aa91ed5d508ec443ca7c992bda52d9 --- M src/osmo-bsc/osmo_bsc_mgcp.c 1 file changed, 12 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/4376/1 diff --git a/src/osmo-bsc/osmo_bsc_mgcp.c b/src/osmo-bsc/osmo_bsc_mgcp.c index 73dd12d..9d38241 100644 --- a/src/osmo-bsc/osmo_bsc_mgcp.c +++ b/src/osmo-bsc/osmo_bsc_mgcp.c @@ -258,10 +258,12 @@ "MGCPGW: (%s) fsm-state: %s, fsm-event: %s\n", mgcp_ctx->name, get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - /* Bail on teardown */ - if (event == EV_TEARDOWN) { + switch (event) { + default: on_error_goto_dlcx(mgcp_ctx); return; + case EV_CRCX_BTS_RESP: + break; } OSMO_ASSERT(conn->conn); @@ -305,10 +307,12 @@ "MGCPGW: (%s) fsm-state: %s, fsm-event: %s\n", mgcp_ctx->name, get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - /* Bail on teardown */ - if (event == EV_TEARDOWN) { + switch (event) { + default: on_error_goto_dlcx(mgcp_ctx); return; + case EV_ASS_COMPLETE: + break; } network = mgcp_ctx->network; @@ -526,10 +530,12 @@ "MGCPGW: (%s) fsm-state: %s, fsm-event: %s\n", mgcp_ctx->name, get_value_string(fsm_bsc_mgcp_state_names, fi->state), get_value_string(fsm_evt_names, event)); - /* Bail on teardown */ - if (event == EV_TEARDOWN) { + switch (event) { + default: on_error_goto_dlcx(mgcp_ctx); return; + case EV_CRCX_NET_RESP: + break; } lchan = mgcp_ctx->lchan; -- To view, visit https://gerrit.osmocom.org/4376 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2aea11c476aa91ed5d508ec443ca7c992bda52d9 Gerrit-PatchSet: 1 Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>