aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-01 07:03:14 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2018-01-12 03:28:14 +0100
commit2e1ae77540a32ca7aba7837680209fa90426ea0c (patch)
tree6bc2b0a564ada50a10c44592c6b5b820be17acb3 /src
parent2113c4b4a3670f46520fc0b42e25f2cc3ace3740 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/libbsc/bsc_api.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index 236163bc1..5dd61aa13 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -367,7 +367,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;