diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-06-23 22:44:20 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-06-24 09:31:17 +0000 |
commit | 3f2212235cdf3ab1ce2438a6fe71d0c15288aa72 (patch) | |
tree | 41bf68ec32e8bfb4af9c19ab644ec078bfe42989 /openbsc/src | |
parent | b0cc64274a6d8d9bc14b0b7e7c50ed79d6ba1a1e (diff) |
dyn PDCH: cosmetic: clarify lchan rel with assertion and comment
Change-Id: If3cc40022e8283daa991fffe4b6baa734303d8a5
Diffstat (limited to 'openbsc/src')
-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 032ff92da..a141a4b06 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); |