diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-06-23 22:44:20 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-06-23 22:45:43 +0200 |
commit | 35a1ce8069da430ed9036958a753a5129418d4ca (patch) | |
tree | f784c704b45b43847ca1f2efa7fedf555dc80541 | |
parent | efedf805263f4e5909628ba7d7c3725114d83710 (diff) |
dyn PDCH: cosmetic: clarify lchan rel with assertion and commentneels/dyn_pdch
Change-Id: If3cc40022e8283daa991fffe4b6baa734303d8a5
-rw-r--r-- | openbsc/src/libbsc/abis_rsl.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c index db78fe328..adfd415bf 100644 --- a/openbsc/src/libbsc/abis_rsl.c +++ b/openbsc/src/libbsc/abis_rsl.c @@ -764,7 +764,17 @@ static int rsl_rx_rf_chan_rel_ack(struct gsm_lchan *lchan) do_lchan_free(lchan); - /* Put PDCH channel back into PDCH mode first */ + /* + * Put a dynamic TCH/F_PDCH channel back to PDCH mode iff it was + * released successfully. If in error, the PDCH ACT will follow after + * T3111 in error_timeout_cb(). + * + * Any state other than LCHAN_S_REL_ERR became LCHAN_S_NONE after above + * do_lchan_free(). Assert this, because that's what ensures a PDCH ACT + * on a dynamic channel in all cases. + */ + OSMO_ASSERT(lchan->state == LCHAN_S_NONE + || lchan->state == LCHAN_S_REL_ERR); if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH && lchan->state == LCHAN_S_NONE) return rsl_ipacc_pdch_activate(lchan->ts, 1); |