]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix when remote candidates exceed PJ_ICE_MAX_CAND 01/1201/1
authorDavid M. Lee <dlee@respoke.io>
Fri, 4 Sep 2015 21:06:39 +0000 (16:06 -0500)
committerDavid M. Lee <dlee@respoke.io>
Fri, 4 Sep 2015 21:06:39 +0000 (16:06 -0500)
We were passing the wrong count into pj_ice_sess_create_check_list(),
causing the create to fail if we ever received more than PJ_ICE_MAX_CAND
candidates.

Change-Id: I0303d8e1ecb20a8de9fe629a3209d216c4028378

res/res_rtp_asterisk.c

index 6f7f94a0c1f60599cf629e0b5f7c5aabaab3c9ec..3982f0a127ac44a96bb9fdf23d5569d32d6f63d6 100644 (file)
@@ -704,8 +704,7 @@ static void ast_rtp_ice_start(struct ast_rtp_instance *instance)
        ao2_iterator_destroy(&i);
 
        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) {
+           pj_ice_sess_create_check_list(rtp->ice, &ufrag, &passwd, cand_cnt, &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);