aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-06-24 00:36:54 +0200
committerHarald Welte <laforge@gnumonks.org>2017-06-24 12:56:08 +0200
commit4699ebaa266ddfc2aad341a089c2fddbd87ba7b2 (patch)
tree76e7109d83c0aaa9c2285a435e0279c2aa654a0e /src/common
parent7a6b178fc0af7c90b901db9ec34dd3ff169db042 (diff)
l1sap: if lchan is in loopback, don't accept incoming RTP
When the lchan is in loopback mode, we loop back all uplink blocks into downlink blocks. We do not processs any RTP frames for that lchan anymore. Rather, we discard those RTP frames to avoid mixing looped-back samples with those received from remote. Change-Id: I29ef4963e9c491c94c413cbc10436a2388c04d9b
Diffstat (limited to 'src/common')
-rw-r--r--src/common/l1sap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index d7e3fb3c..0ab84e54 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1168,6 +1168,11 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
struct msgb *msg;
struct osmo_phsap_prim *l1sap;
+ /* if we're in loopback mode, we don't accept frames from the
+ * RTP socket anymore */
+ if (lchan->loopback)
+ return;
+
msg = l1sap_msgb_alloc(rtp_pl_len);
if (!msg)
return;