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.orgNeels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/11666 ) Change subject: lchan: release in error: fix missing messages / events ...................................................................... lchan: release in error: fix missing messages / events In the case where there is a release in error and we skip immediately to the RF Release state, send all of Deact SACCH, RR Release messages and also signal the lchan_rtp_fsm as appropriate. Move that code to static lchan_do_release() and call from both lchan_fsm_wait_rll_rtp_released_onenter() in the normal case, as well as lchan_release() when skipping that. When releasing in error, but we're already in LCHAN_ST_WAIT_RLL_RTP_RELEASED, those messages have already been sent and we can skip them. Change-Id: I648a9826ce56b611359f81462ca03e4ab4c736aa --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 18 insertions(+), 12 deletions(-) Approvals: Harald Welte: Looks good to me, approved Pau Espin Pedrol: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 39f29f2..f432644 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -927,6 +927,18 @@ } } +static void lchan_do_release(struct gsm_lchan *lchan) +{ + if (lchan->do_rr_release && lchan->sapis[0] != LCHAN_SAPI_UNUSED) + gsm48_send_rr_release(lchan); + + if (lchan->fi_rtp) + osmo_fsm_inst_dispatch(lchan->fi_rtp, LCHAN_RTP_EV_RELEASE, 0); + + if (lchan->deact_sacch && should_sacch_deact(lchan)) + rsl_deact_sacch(lchan); +} + static void lchan_fsm_wait_rll_rtp_released_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { int sapis; @@ -937,14 +949,7 @@ if (lchan->sapis[sapi]) LOG_LCHAN(lchan, LOGL_DEBUG, "SAPI[%d] = %d\n", sapi, lchan->sapis[sapi]); - if (lchan->do_rr_release && lchan->sapis[0] != LCHAN_SAPI_UNUSED) - gsm48_send_rr_release(lchan); - - if (lchan->fi_rtp) - osmo_fsm_inst_dispatch(lchan->fi_rtp, LCHAN_RTP_EV_RELEASE, 0); - - if (lchan->deact_sacch && should_sacch_deact(lchan)) - rsl_deact_sacch(lchan); + lchan_do_release(lchan); sapis = 0; for_each_active_sapi(sapi, 1, lchan) { @@ -1319,10 +1324,11 @@ if (lchan->release_in_error) { switch (lchan->fi->state) { default: - /* Normally we deact SACCH in lchan_fsm_wait_rll_rtp_released_onenter(). When - * skipping that, but asked to SACCH deact, do it now. */ - if (lchan->deact_sacch) - rsl_deact_sacch(lchan); + /* Normally we signal release in lchan_fsm_wait_rll_rtp_released_onenter(). When + * skipping that, do it now. */ + lchan_do_release(lchan); + /* fall thru */ + case LCHAN_ST_WAIT_RLL_RTP_RELEASED: lchan_fsm_state_chg(LCHAN_ST_WAIT_RF_RELEASE_ACK); goto exit_release_handler; case LCHAN_ST_WAIT_TS_READY: -- To view, visit https://gerrit.osmocom.org/11666 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I648a9826ce56b611359f81462ca03e4ab4c736aa Gerrit-Change-Number: 11666 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181114/7bc75887/attachment.htm>