From f6e66a1441297abbd36d2a30fd0a06fd9527b430 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 1 Jun 2013 07:03:14 +0200 Subject: Fix of checking TCH rate at chan_compat_with_mode In case of current channel equals TCH/F and we request half rate, we must return 0, so the calling function will trigger assignment. --- openbsc/src/libbsc/bsc_api.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c index 8ac822e93..d8159eb4a 100644 --- a/openbsc/src/libbsc/bsc_api.c +++ b/openbsc/src/libbsc/bsc_api.c @@ -360,7 +360,11 @@ static int chan_compat_with_mode(struct gsm_lchan *lchan, int chan_mode, int ful * an explicit override by the 'full_rate' argument */ switch (lchan->type) { case GSM_LCHAN_TCH_F: - return 1; + if (full_rate) + return 1; + else + return 0; + break; case GSM_LCHAN_TCH_H: if (full_rate) return 0; -- cgit v1.2.3