Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues when using ICE Trickle #4

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Prev Previous commit
Apply comments in PR
jcague committed Oct 6, 2020
commit 2b71f81bb8395d2643f7251b3d132e1515fa1a69
5 changes: 3 additions & 2 deletions src/ice/ice_candidate_pair.c
Original file line number Diff line number Diff line change
@@ -588,7 +588,8 @@ void nr_ice_candidate_pair_set_state(nr_ice_peer_ctx *pctx, nr_ice_cand_pair *pa

void nr_ice_candidate_pair_dump_state(nr_ice_cand_pair *pair, int log_level)
{
r_log(LOG_ICE,log_level,"CAND-PAIR(%s): pair %s (%s-%s): state=%s, priority=0x%llx\n",pair->codeword,pair->as_string,pair->local->codeword,pair->remote->codeword,nr_ice_cand_pair_states[pair->state],pair->priority);
r_log(LOG_ICE,log_level,"CAND-PAIR(%s): pair %s %s (%s-%s): state=%s, priority=0x%llx\n",
pair->pctx->label, pair->codeword,pair->as_string,pair->local->codeword,pair->remote->codeword,nr_ice_cand_pair_states[pair->state],pair->priority);
}


@@ -621,7 +622,7 @@ int nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *p
return(0);
}

void nr_ice_candidate_pair_check_reduncancy(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair)
void nr_ice_candidate_pair_check_redundancy(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair)
{
nr_ice_cand_pair *c1;

2 changes: 1 addition & 1 deletion src/ice/ice_candidate_pair.h
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ void nr_ice_candidate_pair_cancel(nr_ice_peer_ctx *pctx,nr_ice_cand_pair *pair,
int nr_ice_candidate_pair_select(nr_ice_cand_pair *pair);
int nr_ice_candidate_pair_do_triggered_check(nr_ice_peer_ctx *pctx, nr_ice_cand_pair *pair);
int nr_ice_candidate_pair_insert(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
void nr_ice_candidate_pair_check_reduncancy(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
void nr_ice_candidate_pair_check_redundancy(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
int nr_ice_candidate_pair_trigger_check_append(nr_ice_cand_pair_head *head,nr_ice_cand_pair *pair);
void nr_ice_candidate_pair_restart_stun_nominated_cb(NR_SOCKET s, int how, void *cb_arg);
int nr_ice_candidate_pair_destroy(nr_ice_cand_pair **pairp);
2 changes: 1 addition & 1 deletion src/ice/ice_component.c
Original file line number Diff line number Diff line change
@@ -1742,7 +1742,7 @@ int nr_ice_component_insert_pair(nr_ice_component *pcomp, nr_ice_cand_pair *pair
if(r=nr_ice_candidate_pair_insert(&pair->remote->stream->check_list,pair))
ABORT(r);

nr_ice_candidate_pair_check_reduncancy(&pair->remote->stream->check_list,pair);
nr_ice_candidate_pair_check_redundancy(&pair->remote->stream->check_list,pair);

pair_inserted=1;