diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-05-11 04:15:17 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-10-03 18:43:07 +0700 |
commit | 85086ed29c0bc566f21e7a816ec895bcac8348a7 (patch) | |
tree | 0bb59e4f75be99a270b222bdce1eb36b1a7d725a | |
parent | e9624acdc559978b56766fdb60c717f95067c1f6 (diff) |
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
-rw-r--r-- | src/host/layer23/src/mobile/gsm48_rr.c | 6 |
1 files 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", |