diff options
Diffstat (limited to 'pjnath')
-rw-r--r-- | pjnath/src/pjnath/ice_session.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/pjnath/src/pjnath/ice_session.c b/pjnath/src/pjnath/ice_session.c index aa83fe24..69cce962 100644 --- a/pjnath/src/pjnath/ice_session.c +++ b/pjnath/src/pjnath/ice_session.c @@ -902,6 +902,10 @@ static pj_status_t prune_checklist(pj_ice_sess *ice, * to the local and remote candidates of a pair higher up on the priority * list */ + /* + * Not in ICE! + * Remove host candidates if their base are the the same! + */ for (i=0; i<clist->count; ++i) { pj_ice_sess_cand *licand = clist->checks[i].lcand; pj_ice_sess_cand *ricand = clist->checks[i].rcand; @@ -910,14 +914,24 @@ static pj_status_t prune_checklist(pj_ice_sess *ice, for (j=i+1; j<clist->count;) { pj_ice_sess_cand *ljcand = clist->checks[j].lcand; pj_ice_sess_cand *rjcand = clist->checks[j].rcand; + const char *reason = NULL; if ((licand == ljcand) && (ricand == rjcand)) { + reason = "duplicate found"; + } else if (sockaddr_cmp(&ljcand->base_addr, + &licand->base_addr)==0) + { + reason = "equal base"; + } + + if (reason != NULL) { /* Found duplicate, remove it */ char buf[CHECK_NAME_LEN]; - LOG5((ice->obj_name, "Check %s pruned", - dump_check(buf, sizeof(buf), &ice->clist, - &clist->checks[j]))); + LOG5((ice->obj_name, "Check %s pruned (%s)", + dump_check(buf, sizeof(buf), &ice->clist, + &clist->checks[j]), + reason)); pj_array_erase(clist->checks, sizeof(clist->checks[0]), clist->count, j); |