Change in osmo-bts[master]: pcu_sock: fix pcu_sock_close(): deactivate dynamic timeslots too

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/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Oct 8 20:32:40 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/20494 )

Change subject: pcu_sock: fix pcu_sock_close(): deactivate dynamic timeslots too
......................................................................

pcu_sock: fix pcu_sock_close(): deactivate dynamic timeslots too

Change-Id: Ib0efa6e1e2a68ac9675a18487b79d9b14bdb22c5
Fixes: OS#4785
---
M src/common/pcu_sock.c
1 file changed, 9 insertions(+), 8 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index d54e385..6040de5 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -882,7 +882,6 @@
 	struct osmo_fd *bfd = &state->conn_bfd;
 	struct gsm_bts *bts;
 	struct gsm_bts_trx *trx;
-	struct gsm_bts_trx_ts *ts;
 	unsigned int tn;
 
 	/* FIXME: allow multiple BTS */
@@ -913,13 +912,15 @@
 	/* Deactivate all active PDCH timeslots */
 	llist_for_each_entry(trx, &bts->trx_list, list) {
 		for (tn = 0; tn < 8; tn++) {
-			ts = &trx->ts[tn];
-			if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED
-			 && ts->pchan == GSM_PCHAN_PDCH) {
-				ts->lchan[0].rel_act_kind = LCHAN_REL_ACT_PCU;
-				l1sap_chan_rel(trx,
-					gsm_lchan2chan_nr(&ts->lchan[0]));
-			}
+			struct gsm_bts_trx_ts *ts = &trx->ts[tn];
+
+			if (ts->mo.nm_state.operational != NM_OPSTATE_ENABLED)
+				continue;
+			if (!ts_should_be_pdch(ts))
+				continue;
+
+			ts->lchan[0].rel_act_kind = LCHAN_REL_ACT_PCU;
+			l1sap_chan_rel(trx, gsm_lchan2chan_nr(&ts->lchan[0]));
 		}
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20494
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib0efa6e1e2a68ac9675a18487b79d9b14bdb22c5
Gerrit-Change-Number: 20494
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201008/e8514927/attachment.htm>


More information about the gerrit-log mailing list