aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Francois Dionne <jf.dionne@nutaq.com>2016-12-22 12:52:33 +0100
committerMax <msuraev@sysmocom.de>2016-12-22 12:55:30 +0100
commit304420ca42e17ee85d896d5c9e1f2f19a43b8f39 (patch)
tree21f46b0f23b2a470fb6d4ae7a285050c6051d9b3
parentfbe655f3202d6968c24abbddc46bff499bfeda5e (diff)
DTX: don't always perform AMR HR specific check
Disable check specific to AMR HR if not DTX is enabled. Change-Id: I8af1daffbd7e59fef6e671dbd9b820497f82d354 Fixes: OS#1892
-rw-r--r--src/common/msg_utils.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c
index b844eec2..9de9b6d6 100644
--- a/src/common/msg_utils.c
+++ b/src/common/msg_utils.c
@@ -156,12 +156,14 @@ int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl,
int8_t sti, cmi;
int rc;
- if (lchan->type == GSM_LCHAN_TCH_H && /* SID-FIRST P1 -> P2 completion */
- lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2 && !rtp_pl) {
- *len = 3;
- memcpy(l1_payload, lchan->tch.dtx.cache, 2);
- dtx_dispatch(lchan, E_SID_U);
- return 0;
+ if (dtx_dl_amr_enabled(lchan)) {
+ if (lchan->type == GSM_LCHAN_TCH_H &&
+ lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F2 && !rtp_pl) {
+ *len = 3; /* SID-FIRST P1 -> P2 completion */
+ memcpy(l1_payload, lchan->tch.dtx.cache, 2);
+ dtx_dispatch(lchan, E_SID_U);
+ return 0;
+ }
}
if (!rtp_pl_len)