jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/33605 ) Change subject: ASCI: Do not release channel, if SAPI 0 is released ...................................................................... ASCI: Do not release channel, if SAPI 0 is released A VGCS channel must not release, if all SAPIs (including 0) are released. lchan FSM will ignore this. Change-Id: Ief1e1894362c4917f6e0092268690f68c8193750 Related: OS#4852 --- M include/osmocom/bsc/lchan_fsm.h M src/osmo-bsc/lchan_fsm.c 2 files changed, 29 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/05/33605/1 diff --git a/include/osmocom/bsc/lchan_fsm.h b/include/osmocom/bsc/lchan_fsm.h index b179a7f..cf9f20f 100644 --- a/include/osmocom/bsc/lchan_fsm.h +++ b/include/osmocom/bsc/lchan_fsm.h @@ -78,6 +78,8 @@ bool lchan_may_receive_data(struct gsm_lchan *lchan); +bool lchan_is_asci(struct gsm_lchan *lchan); + void lchan_forget_conn(struct gsm_lchan *lchan); void lchan_fsm_skip_error(struct gsm_lchan *lchan); diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 33ae6cf..8e9d698 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -69,6 +69,13 @@ } } +bool lchan_is_asci(struct gsm_lchan *lchan) +{ + if (lchan->activate.info.vgcs || lchan->activate.info.vbs) + return true; + return false; +} + static void lchan_on_mode_modify_success(struct gsm_lchan *lchan) { lchan->modify.concluded = true; @@ -1228,8 +1235,11 @@ /* Releasing SAPI 0 means the conn becomes invalid; but not if the link_id contains a SACCH flag. */ if (lchan->conn && sapi == 0 && !(link_id & 0xc0)) { - LOG_LCHAN(lchan, LOGL_DEBUG, "lchan is releasing\n"); - gscon_lchan_releasing(lchan->conn, lchan); + /* A VGCS channel may have all SAPIs (including SAPI 0) released.. */ + if (!lchan_is_asci(lchan)) { + LOG_LCHAN(lchan, LOGL_DEBUG, "lchan is releasing\n"); + gscon_lchan_releasing(lchan->conn, lchan); + } /* if SAPI=0 is gone, it makes no sense if other SAPIs are still around, * this is not a valid configuration and we should forget about them. @@ -1257,7 +1267,8 @@ case LCHAN_EV_RLL_REL_IND: case LCHAN_EV_RLL_REL_CONF: handle_rll_rel_ind_or_conf(fi, event, data); - if (!lchan_active_sapis(lchan, 0)) + /* Only release channel, if there is no SAPI and this channel is not a VGCS channel. */ + if (!lchan_active_sapis(lchan, 0) && !lchan_is_asci(lchan)) lchan_fsm_state_chg(LCHAN_ST_WAIT_RLL_RTP_RELEASED); return; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/33605 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ief1e1894362c4917f6e0092268690f68c8193750 Gerrit-Change-Number: 33605 Gerrit-PatchSet: 1 Gerrit-Owner: jolly <andreas@eversberg.eu> Gerrit-MessageType: newchange