Change in osmo-bsc[master]: Properly handle dyn TS TCH with vamos after updating subslots_per_pchan

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

pespin gerrit-no-reply at lists.osmocom.org
Mon Oct 25 12:26:29 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25940 )


Change subject: Properly handle dyn TS TCH with vamos after updating subslots_per_pchan
......................................................................

Properly handle dyn TS TCH with vamos after updating subslots_per_pchan

Related: OS#5278
Change-Id: If86af5fafe059d5e830c1f6d37034f7325d9a96c
---
M src/osmo-bsc/timeslot_fsm.c
1 file changed, 6 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/40/25940/1

diff --git a/src/osmo-bsc/timeslot_fsm.c b/src/osmo-bsc/timeslot_fsm.c
index 76ac1af..499d982 100644
--- a/src/osmo-bsc/timeslot_fsm.c
+++ b/src/osmo-bsc/timeslot_fsm.c
@@ -201,6 +201,8 @@
 {
 	int i;
 	struct gsm_lchan *lchan;
+	uint8_t max_lchans_possible_vamos;
+
 	ts->pchan_is = pchan_is;
 	ts->max_primary_lchans = pchan_subslots(ts->pchan_is);
 	LOG_TS(ts, LOGL_DEBUG, "pchan_is=%s max_primary_lchans=%d max_lchans_possible=%d\n",
@@ -208,12 +210,13 @@
 	switch (ts->pchan_is) {
 	case GSM_PCHAN_TCH_F:
 	case GSM_PCHAN_TCH_H:
+		max_lchans_possible_vamos = pchan_subslots_vamos(ts->pchan_is);
 		for (i = 0; i < ts->max_lchans_possible; i++) {
 			lchan = &ts->lchan[i];
-			if (i < ts->max_primary_lchans)
-				lchan->vamos.is_secondary = false;
-			else
+			if (i >= ts->max_primary_lchans && i < max_lchans_possible_vamos)
 				lchan->vamos.is_secondary = true;
+			else
+				lchan->vamos.is_secondary = false;
 			lchan_fsm_update_id(lchan);
 		}
 		break;

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: If86af5fafe059d5e830c1f6d37034f7325d9a96c
Gerrit-Change-Number: 25940
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211025/731f49db/attachment.htm>


More information about the gerrit-log mailing list