From 85086ed29c0bc566f21e7a816ec895bcac8348a7 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Fri, 11 May 2018 04:15:17 +0700 Subject: mobile/gsm48_rr.c: print error if ch_type is not TCH The CHANNEL MODE MODIFY message only applies to TCH channels, and in general should not arrive on non-traffic channels. Let's print error message if this happens in order to facilitate finding possible bugs. Change-Id: I4ab63c4ae4262c8166de37e4873fc3f1b8ec6fe7 --- src/host/layer23/src/mobile/gsm48_rr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/host/layer23/src/mobile/gsm48_rr.c b/src/host/layer23/src/mobile/gsm48_rr.c index b61c92bd..9e563ed6 100644 --- a/src/host/layer23/src/mobile/gsm48_rr.c +++ b/src/host/layer23/src/mobile/gsm48_rr.c @@ -3433,9 +3433,11 @@ static int gsm48_rr_set_mode(struct osmocom_ms *ms, uint8_t chan_nr, } /* only apply mode to TCH/F or TCH/H */ - if (ch_type != RSL_CHAN_Bm_ACCHs - && ch_type != RSL_CHAN_Lm_ACCHs) + if (ch_type != RSL_CHAN_Bm_ACCHs && ch_type != RSL_CHAN_Lm_ACCHs) { + LOGP(DRR, LOGL_ERROR, "CHANNEL MODE MODIFY only applies " + "to TCH channels, ignoring...\n"); return -ENOTSUP; + } /* setting (new) timing advance */ LOGP(DRR, LOGL_INFO, "setting TCH mode to %s, audio mode to %d\n", -- cgit v1.2.3