diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-08-21 01:53:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-08-22 19:56:35 +0000 |
commit | 5f0a63d67833538e78aaa57c4965bf2ecce89035 (patch) | |
tree | 848d16502496ca3cab1167c68d421884b7fdba6b /src/osmo-bsc | |
parent | dcbcbad374d957b1e253ccfd2c35eccaa8aa5348 (diff) |
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
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r-- | src/osmo-bsc/lchan_rtp_fsm.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 2cc9a781c..091af5e67 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -467,6 +467,14 @@ static void lchan_rtp_fsm_wait_mgw_endpoint_configured(struct osmo_fsm_inst *fi, 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 @@ static void lchan_rtp_fsm_rollback(struct osmo_fsm_inst *fi, uint32_t event, voi 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); } |