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.orgHarald Welte has submitted this change and it was merged.
Change subject: dyn TS: bts_chan_load: use correct nr of subslots for dyn ts
......................................................................
dyn TS: bts_chan_load: use correct nr of subslots for dyn ts
For TCH/F_TCH/H_PDCH dynamic timeslots, the ts->pchan does not lead to a
meaningful value from the subslots_per_pchan[] array. Use the ts_subslots()
function instead, which checks for dyn pchan.
Change-Id: I659acebca82dfb3e305433471be64e9d27439af8
---
M openbsc/src/libbsc/chan_alloc.c
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
diff --git a/openbsc/src/libbsc/chan_alloc.c b/openbsc/src/libbsc/chan_alloc.c
index c3a7e0f..d9808f4 100644
--- a/openbsc/src/libbsc/chan_alloc.c
+++ b/openbsc/src/libbsc/chan_alloc.c
@@ -555,12 +555,14 @@
 			struct gsm_bts_trx_ts *ts = &trx->ts[i];
 			struct load_counter *pl = &cl->pchan[ts->pchan];
 			int j;
+			int subslots;
 
 			/* skip administratively deactivated timeslots */
 			if (!nm_is_running(&ts->mo.nm_state))
 				continue;
 
-			for (j = 0; j < subslots_per_pchan[ts->pchan]; j++) {
+			subslots = ts_subslots(ts);
+			for (j = 0; j < subslots; j++) {
 				struct gsm_lchan *lchan = &ts->lchan[j];
 
 				pl->total++;
-- 
To view, visit https://gerrit.osmocom.org/667
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I659acebca82dfb3e305433471be64e9d27439af8
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
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>