[PATCH] openbsc[master]: lchan: Release channel in case of late activation ack

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
Mon Oct 31 00:30:45 UTC 2016


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/713

to look at the new patch set (#4).

lchan: Release channel in case of late activation ack

In case of the sysmoBTS and receiving a channel activation ack on
a channel that was marked as broken, release it again.

Use a normal release without SACCH deactivation and release the
rqd_ta data.

Cosmetic: add local variable 'ts' to shorten some lines.

Tweaked-By: nhofmeyr
Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed
---
M openbsc/src/libbsc/abis_rsl.c
1 file changed, 20 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/13/713/4

diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 9656961..d963b6b 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1175,6 +1175,7 @@
 {
 	struct abis_rsl_dchan_hdr *rslh = msgb_l2(msg);
 	struct gsm_lchan *lchan = msg->lchan;
+	struct gsm_bts_trx_ts *ts = lchan->ts;
 
 	/* BTS has confirmed channel activation, we now need
 	 * to assign the activated channel to the MS */
@@ -1184,8 +1185,24 @@
 	osmo_timer_del(&lchan->act_timer);
 
 	if (lchan->state == LCHAN_S_BROKEN) {
-		LOGP(DRSL, LOGL_NOTICE, "%s CHAN ACT ACK for broken channel.\n",
-			gsm_lchan_name(lchan));
+		int do_release = is_sysmobts_v2(ts->trx->bts);
+		LOGP(DRSL, LOGL_NOTICE, "%s CHAN ACT ACK for broken channel. %s\n",
+			gsm_lchan_name(lchan),
+			do_release ? "Releasing it" : "Keeping it broken");
+		if (do_release) {
+			talloc_free(lchan->rqd_ref);
+			lchan->rqd_ref = NULL;
+			lchan->rqd_ta = 0;
+			rsl_lchan_set_state(msg->lchan, LCHAN_S_ACTIVE);
+			if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
+				/* Make sure that rsl_rx_rf_chan_rel_ack()
+				 * will switch back to PDCH: */
+				if (ts->dyn.pchan_is == GSM_PCHAN_PDCH)
+					ts->dyn.pchan_is = GSM_PCHAN_NONE;
+				ts->dyn.pchan_want = GSM_PCHAN_NONE;
+			}
+			rsl_rf_chan_release(msg->lchan, 0, SACCH_NONE);
+		}
 		return 0;
 	}
 
@@ -1195,7 +1212,7 @@
 			gsm_lchans_name(lchan->state));
 	rsl_lchan_set_state(lchan, LCHAN_S_ACTIVE);
 
-	if (lchan->ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH)
+	if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH)
 		dyn_ts_switchover_complete(lchan);
 
 	if (lchan->rqd_ref) {

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I63dc0deaf15ba7c21e20b1e0c7b85f0437e183ed
Gerrit-PatchSet: 4
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list