Changeset 4205 for pjproject


Ignore:
Timestamp:
Jul 14, 2012 12:49:36 PM (12 years ago)
Author:
bennylp
Message:

Fixed #1554: Assertion in ICE when STUN resolution yields a same address as one of the host candidate and there is only one host candidate exists (thanks Claudio De Angelis for the report)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r4203 r4205  
    504504    } 
    505505 
     506    /* It's possible that we end up without any candidates */ 
     507    if (comp->cand_cnt == 0) { 
     508        PJ_LOG(4,(ice_st->obj_name, 
     509                  "Error: no candidate is created due to settings")); 
     510        return PJ_EINVAL; 
     511    } 
     512 
    506513    return PJ_SUCCESS; 
    507514} 
     
    15491556                        --comp->default_cand; 
    15501557                    } else if (comp->default_cand == idx) { 
    1551                         comp->default_cand = !idx; 
     1558                        comp->default_cand = 0; 
    15521559                    } 
    15531560 
     
    15771584            if (cand) 
    15781585                cand->status = status; 
    1579             if (!ice_st->cfg.stun.ignore_stun_error) { 
     1586            if (!ice_st->cfg.stun.ignore_stun_error || comp->cand_cnt==1) { 
    15801587                sess_fail(ice_st, PJ_ICE_STRANS_OP_INIT, 
    15811588                          "STUN binding request failed", status); 
Note: See TracChangeset for help on using the changeset viewer.