Changeset 1392 for pjproject


Ignore:
Timestamp:
Jun 26, 2007 10:10:24 AM (17 years ago)
Author:
bennylp
Message:

Ticket #344: ICE negotiation failed when remote doesn't support RTCP

File:
1 edited

Legend:

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

    r1374 r1392  
    11961196    timer_data *td; 
    11971197    unsigned i, j; 
     1198    unsigned highest_comp = 0; 
    11981199    pj_status_t status; 
    11991200 
     
    12321233            continue; 
    12331234        } 
     1235 
     1236        if (rcand[i].comp_id > highest_comp) 
     1237            highest_comp = rcand[i].comp_id; 
    12341238 
    12351239        pj_memcpy(cn, &rcand[i], sizeof(pj_ice_sess_cand)); 
     
    12811285        pj_mutex_unlock(ice->mutex); 
    12821286        return status; 
     1287    } 
     1288 
     1289    /* Disable our components which don't have matching component */ 
     1290    if (ice->comp_cnt==2 && highest_comp==1) { 
     1291        ice->comp_cnt = 1; 
    12831292    } 
    12841293 
     
    22552264    pj_ice_sess_comp *comp; 
    22562265 
    2257     PJ_ASSERT_RETURN(ice && comp_id && comp_id <= ice->comp_cnt, PJ_EINVAL); 
     2266    PJ_ASSERT_RETURN(ice && comp_id, PJ_EINVAL); 
    22582267     
     2268    /* It is possible that comp_cnt is less than comp_id, when remote 
     2269     * doesn't support all the components that we have. 
     2270     */ 
     2271    if (comp_id > ice->comp_cnt) { 
     2272        return PJNATH_EICEINCOMPID; 
     2273    } 
     2274 
    22592275    pj_mutex_lock(ice->mutex); 
    22602276 
Note: See TracChangeset for help on using the changeset viewer.