[svn-commits] kharwell: branch 13 r425031 - in /branches/13: ./ res/res_rtp_asterisk.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 9 16:38:20 CDT 2014


Author: kharwell
Date: Thu Oct  9 16:38:18 2014
New Revision: 425031

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=425031
Log: (empty)

Modified:
    branches/13/   (props changed)
    branches/13/res/res_rtp_asterisk.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_rtp_asterisk.c?view=diff&rev=425031&r1=425030&r2=425031
==============================================================================
--- branches/13/res/res_rtp_asterisk.c (original)
+++ branches/13/res/res_rtp_asterisk.c Thu Oct  9 16:38:18 2014
@@ -645,7 +645,7 @@
 	pj_ice_sess_cand candidates[PJ_ICE_MAX_CAND];
 	struct ao2_iterator i;
 	struct ast_rtp_engine_ice_candidate *candidate;
-	int cand_cnt = 0;
+	int cand_cnt = 0, has_rtp = 0, has_rtcp = 0;
 
 	if (!rtp->ice || !rtp->ice_proposed_remote_candidates) {
 		return;
@@ -677,6 +677,10 @@
 	while ((candidate = ao2_iterator_next(&i)) && (cand_cnt < PJ_ICE_MAX_CAND)) {
 		pj_str_t address;
 
+		/* there needs to be at least one rtp and rtcp candidate in the list */
+		has_rtp |= candidate->id == AST_RTP_ICE_COMPONENT_RTP;
+		has_rtcp |= candidate->id == AST_RTP_ICE_COMPONENT_RTCP;
+
 		pj_strdup2(rtp->ice->pool, &candidates[cand_cnt].foundation, candidate->foundation);
 		candidates[cand_cnt].comp_id = candidate->id;
 		candidates[cand_cnt].prio = candidate->priority;
@@ -707,7 +711,9 @@
 
 	ao2_iterator_destroy(&i);
 
-	if (pj_ice_sess_create_check_list(rtp->ice, &ufrag, &passwd, ao2_container_count(rtp->ice_active_remote_candidates), &candidates[0]) == PJ_SUCCESS) {
+	if (has_rtp && has_rtcp &&
+	    pj_ice_sess_create_check_list(rtp->ice, &ufrag, &passwd, ao2_container_count(
+						  rtp->ice_active_remote_candidates), &candidates[0]) == PJ_SUCCESS) {
 		ast_test_suite_event_notify("ICECHECKLISTCREATE", "Result: SUCCESS");
 		pj_ice_sess_start_check(rtp->ice);
 		pj_timer_heap_poll(timer_heap, NULL);




More information about the svn-commits mailing list