Changeset 1215


Ignore:
Timestamp:
Apr 28, 2007 4:14:42 AM (18 years ago)
Author:
bennylp
Message:

ICE: prune host candidates (not in ICE)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/split-3rd-party/pjnath/src/pjnath/ice_session.c

    r1211 r1215  
    903903     * list 
    904904     */ 
     905    /* 
     906     * Not in ICE! 
     907     * Remove host candidates if their base are the the same! 
     908     */ 
    905909    for (i=0; i<clist->count; ++i) { 
    906910        pj_ice_sess_cand *licand = clist->checks[i].lcand; 
     
    911915            pj_ice_sess_cand *ljcand = clist->checks[j].lcand; 
    912916            pj_ice_sess_cand *rjcand = clist->checks[j].rcand; 
     917            const char *reason = NULL; 
    913918 
    914919            if ((licand == ljcand) && (ricand == rjcand)) { 
     920                reason = "duplicate found"; 
     921            } else if (sockaddr_cmp(&ljcand->base_addr,  
     922                                    &licand->base_addr)==0)  
     923            { 
     924                reason = "equal base"; 
     925            } 
     926 
     927            if (reason != NULL) { 
    915928                /* Found duplicate, remove it */ 
    916929                char buf[CHECK_NAME_LEN]; 
    917930 
    918                 LOG5((ice->obj_name, "Check %s pruned", 
    919                      dump_check(buf, sizeof(buf), &ice->clist,  
    920                                 &clist->checks[j]))); 
     931                LOG5((ice->obj_name, "Check %s pruned (%s)", 
     932                      dump_check(buf, sizeof(buf), &ice->clist,  
     933                                 &clist->checks[j]), 
     934                      reason)); 
    921935 
    922936                pj_array_erase(clist->checks, sizeof(clist->checks[0]), 
Note: See TracChangeset for help on using the changeset viewer.