aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/abis_rsl.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-06-23 22:44:20 +0200
committerHarald Welte <laforge@gnumonks.org>2016-06-24 09:31:17 +0000
commit3f2212235cdf3ab1ce2438a6fe71d0c15288aa72 (patch)
tree41bf68ec32e8bfb4af9c19ab644ec078bfe42989 /openbsc/src/libbsc/abis_rsl.c
parentb0cc64274a6d8d9bc14b0b7e7c50ed79d6ba1a1e (diff)
dyn PDCH: cosmetic: clarify lchan rel with assertion and comment
Diffstat (limited to 'openbsc/src/libbsc/abis_rsl.c')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c12
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);