From bf39996dd080bc3fea0dc6fb6e9dc1a6eebb60c3 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Wed, 12 Sep 2018 16:17:41 +0200 Subject: LCLS: fix codec mismatch detection gsm_subscriber_connection.user_plane.chan_mode and .full_rate were unused since and forgotten to be removed in: commit 31f525e7560ad13e32cfc5e0b5f1862c0efcb991 Date Mon May 14 18:14:15 2018 +0200 "large refactoring: use FSMs for lchans; add inter-BSC HO" Instead of above unused struct members, use lchan->{full_rate,tch_mode}. When not explicitly allowed via VTY settings, the LCLS mechanisms will avoid to locally switch connections with different codecs/rates. For example GSM HR and GSM FR would not be locally switched. Change-Id: Idd7117092b1f170d5029303ae5ba0a49e02a8bfb Related: OS#1602 --- src/osmo-bsc/osmo_bsc_lcls.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/osmo-bsc/osmo_bsc_lcls.c') diff --git a/src/osmo-bsc/osmo_bsc_lcls.c b/src/osmo-bsc/osmo_bsc_lcls.c index 6aeccb3bb..00c329683 100644 --- a/src/osmo-bsc/osmo_bsc_lcls.c +++ b/src/osmo-bsc/osmo_bsc_lcls.c @@ -274,15 +274,15 @@ static bool lcls_enable_possible(struct gsm_subscriber_connection *conn) return false; } - if (conn->user_plane.full_rate != conn->lcls.other->user_plane.full_rate + if (conn->lchan->type != conn->lcls.other->lchan->type && conn->sccp.msc->lcls_codec_mismatch_allow == false) { - LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismiatch (channel rate)\n"); + LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismatch (channel type)\n"); return false; } - if (conn->user_plane.chan_mode != conn->lcls.other->user_plane.chan_mode + if (conn->lchan->tch_mode != conn->lcls.other->lchan->tch_mode && conn->sccp.msc->lcls_codec_mismatch_allow == false) { - LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismiatch (channel mode)\n"); + LOGPFSM(conn->lcls.fi, "Not enabling LS due to codec mismatch (TCH-Mode)\n"); return false; } -- cgit v1.2.3