[MERGED] 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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Jun 24 09:31:17 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: dyn PDCH: cosmetic: clarify lchan rel with assertion and comment
......................................................................


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(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 032ff92..a141a4b 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: merged
Gerrit-Change-Id: If3cc40022e8283daa991fffe4b6baa734303d8a5
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list