[Asterisk-code-review] res rtp asterisk: Use RTP component for ICE if RTCP-MUX is i... (asterisk[14])
Joshua Colp
asteriskteam at digium.com
Sun Jul 16 12:26:22 CDT 2017
Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/6027
Change subject: res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use.
......................................................................
res_rtp_asterisk: Use RTP component for ICE if RTCP-MUX is in use.
This change makes it so that if an RTCP packet is being sent
the RTP ICE component is used for sending if RTCP-MUX is in use.
ASTERISK-27133
Change-Id: I6200f611ede709602ee9b89501720c29545ed68b
---
M res/res_rtp_asterisk.c
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/27/6027/1
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 2a2fbf7..ea47423 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -2587,8 +2587,14 @@
#ifdef HAVE_PJPROJECT
if (rtp->ice) {
+ enum ast_rtp_ice_component_type component = rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP;
pj_status_t status;
struct ice_wrap *ice;
+
+ /* If RTCP is sharing the same socket then use the same component */
+ if (rtcp && rtp->rtcp->s == rtp->s) {
+ component = AST_RTP_ICE_COMPONENT_RTP;
+ }
pj_thread_register_check();
@@ -2596,8 +2602,7 @@
ice = rtp->ice;
ao2_ref(ice, +1);
ao2_unlock(instance);
- status = pj_ice_sess_send_data(ice->real_ice,
- rtcp ? AST_RTP_ICE_COMPONENT_RTCP : AST_RTP_ICE_COMPONENT_RTP, temp, len);
+ status = pj_ice_sess_send_data(ice->real_ice, component, temp, len);
ao2_ref(ice, -1);
ao2_lock(instance);
if (status == PJ_SUCCESS) {
--
To view, visit https://gerrit.asterisk.org/6027
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6200f611ede709602ee9b89501720c29545ed68b
Gerrit-Change-Number: 6027
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170716/b6760a50/attachment.html>
More information about the asterisk-code-review
mailing list