diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2018-09-12 16:17:41 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-09-17 12:48:29 +0000 |
commit | bf39996dd080bc3fea0dc6fb6e9dc1a6eebb60c3 (patch) | |
tree | 679a6747d9ec75ca352afeac50a24cec47ee5474 | |
parent | 63c81ef0ef0c96b38513bd1e234c5e1a594396ec (diff) |
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
-rw-r--r-- | src/osmo-bsc/osmo_bsc_lcls.c | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |