summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libbsc/bsc_api.c')
-rw-r--r--openbsc/src/libbsc/bsc_api.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 75bb3e100..991c44dfa 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -210,6 +210,13 @@ static int handle_new_assignment(struct gsm_subscriber_connection *conn, int cha
return -1;
}
+ /* check if we are on TCH/F and requested TCH/H, but got TCH/F */
+ if (conn->lchan->type == new_lchan->type) {
+ lchan_free(new_lchan);
+ LOGP(DMSC, LOGL_NOTICE, "Not assign to equal channel rate.\n");
+ return -1;
+ }
+
/* copy old data to the new channel */
memcpy(&new_lchan->encr, &conn->lchan->encr, sizeof(new_lchan->encr));
new_lchan->ms_power = conn->lchan->ms_power;