Change in osmo-bsc[master]: handover_fsm: copy old S15_S0 to new lchan

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Mar 11 16:10:41 UTC 2019


Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13200 )

Change subject: handover_fsm: copy old S15_S0 to new lchan
......................................................................

handover_fsm: copy old S15_S0 to new lchan

When a new lchan is selected during handover, some of the properties of
the old lchan are inherited by the new lchan. At the moment S15-S0 is
not not inherited so that the value for those bits will always be 0x0000
for the new lchan. Since those bits also define the active set AMR codec
the channel activation will fail because 0x0000 is invalid (active set
with zero rates)

Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2
Related: OS#3503
---
M src/osmo-bsc/handover_fsm.c
M tests/handover/handover_test.c
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 30297f6..a3d25d6 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -362,6 +362,7 @@
 		.msc_assigned_cic = conn->ho.inter_bsc_in.msc_assigned_cic,
 		.re_use_mgw_endpoint_from_lchan = conn->lchan,
 		.wait_before_switching_rtp = true,
+		.s15_s0 = conn->lchan->activate.info.s15_s0,
 	};
 
 	lchan_activate(ho->new_lchan, &info);
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index 6217ca3..cd3b749 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -276,9 +276,10 @@
 		lchan->tch_mode = GSM48_CMODE_SPEECH_V1;
 	else if (!strcasecmp(codec, "EFR") && full_rate)
 		lchan->tch_mode = GSM48_CMODE_SPEECH_EFR;
-	else if (!strcasecmp(codec, "AMR"))
+	else if (!strcasecmp(codec, "AMR")) {
 		lchan->tch_mode = GSM48_CMODE_SPEECH_AMR;
-	else {
+		lchan->activate.info.s15_s0 = 0x0002;
+	} else {
 		printf("Given codec unknown\n");
 		exit(EXIT_FAILURE);
 	}

-- 
To view, visit https://gerrit.osmocom.org/13200
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifd470397e99985394634da1bb13ccfc5041984d2
Gerrit-Change-Number: 13200
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190311/459a3257/attachment.html>


More information about the gerrit-log mailing list