fix lchan_rtp_fsm: missing event handling
Release and Rollback events are allowed but unhandled in states
WAIT_MGW_CONFIGURED and ROLLBACK, and hence would result in an assertion. Add
handling in these states.
Change-Id: Iab233c592384902098644eee27bb8445fde3aa6f
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 2cc9a78..091af5e 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -467,6 +467,14 @@
lchan_rtp_fail("Error while redirecting the MGW to the lchan's RTP port");
return;
+ case LCHAN_RTP_EV_ROLLBACK:
+ lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_ROLLBACK);
+ return;
+
+ case LCHAN_RTP_EV_RELEASE:
+ osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, 0);
+ return;
+
default:
OSMO_ASSERT(false);
}
@@ -533,6 +541,11 @@
osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, 0);
return;
+ case LCHAN_RTP_EV_RELEASE:
+ case LCHAN_RTP_EV_ROLLBACK:
+ /* Already rolling back, ignore. */
+ return;
+
default:
OSMO_ASSERT(false);
}