aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-03-11 14:10:26 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-05-08 13:34:29 +0200
commit1f6930ead5154841928b4e2fff34b938617cd823 (patch)
tree76b2b7813bbf74b8add89d46ab7d9ee974684def
parent117fa9d92d0da3d94a51cbfc1cbeb0d5bdcd3767 (diff)
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
-rw-r--r--src/osmo-bsc/handover_fsm.c1
-rw-r--r--tests/handover/handover_test.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 35f2e5553..68c3e4a54 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -362,6 +362,7 @@ static void handover_start_intra_bsc(struct gsm_subscriber_connection *conn)
.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 6217ca3e7..cd3b7494b 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -276,9 +276,10 @@ struct gsm_lchan *create_lchan(struct gsm_bts *bts, int full_rate, char *codec)
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);
}