[PATCH] openbsc[master]: dyn PDCH: cosmetic: clarify lchan rel with assertion and com...

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.org
Thu Jun 23 20:48:19 UTC 2016


Review at  https://gerrit.osmocom.org/409

dyn PDCH: cosmetic: clarify lchan rel with assertion and comment

Change-Id: If3cc40022e8283daa991fffe4b6baa734303d8a5
---
M openbsc/src/libbsc/abis_rsl.c
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/09/409/1

diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index db78fe3..adfd415 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -764,7 +764,17 @@
 
 	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);

-- 
To view, visit https://gerrit.osmocom.org/409
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3cc40022e8283daa991fffe4b6baa734303d8a5
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list