summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-01 07:03:14 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:44:21 +0200
commitf6e66a1441297abbd36d2a30fd0a06fd9527b430 (patch)
treee1b0c3e6d9d243c80e4ced4cd15d8a259b0b2d06
parentf8e842f0e8b1353ca3ed0fef13f613fb022a78f0 (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.
-rw-r--r--openbsc/src/libbsc/bsc_api.c6
1 files changed, 5 insertions, 1 deletions
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;