diff options
-rw-r--r-- | src/osmo-bsc/lchan_rtp_fsm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index aaba563ca..6ab3da4d9 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -738,7 +738,11 @@ void lchan_rtp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause ca lchan->mgw_endpoint_ci_bts = NULL; } lchan->fi_rtp = NULL; - if (lchan->fi) + + /* In all other cause, FSM already takes care of sending the event we + * configured at osmo_fsm_inst_alloc_child() time immediately after + * returning here. */ + if (lchan->fi && cause == OSMO_FSM_TERM_PARENT) osmo_fsm_inst_dispatch(lchan->fi, LCHAN_EV_RTP_RELEASED, 0); } |