Ignore:
Timestamp:
Oct 14, 2009 1:13:18 PM (11 years ago)
Author:
bennylp
Message:

Ticket #881: send UPDATE or re-INVITE after ICE negotiation, if the default candidate has changed

  • done
  • added pj_ice_strans_state (to be used for informational purposes for now)
  • added pjmedia ICE transport specific info, and display it in call dump output
  • misc fixes (changed pjmedia_transport_info.spec_info_cnt from int to unsigned)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/transport_ice.c

    r2896 r2945  
    14741474    } 
    14751475 
     1476    /* Fill up transport specific info */ 
     1477    if (info->specific_info_cnt < PJ_ARRAY_SIZE(info->spc_info)) { 
     1478        pjmedia_transport_specific_info *tsi; 
     1479        pjmedia_ice_transport_info *ii; 
     1480        unsigned i; 
     1481 
     1482        pj_assert(sizeof(*ii) <= sizeof(tsi->buffer)); 
     1483        tsi = &info->spc_info[info->specific_info_cnt++]; 
     1484        tsi->type = PJMEDIA_TRANSPORT_TYPE_ICE; 
     1485        tsi->cbsize = sizeof(*ii); 
     1486 
     1487        ii = (pjmedia_ice_transport_info*) tsi->buffer; 
     1488        pj_bzero(ii, sizeof(*ii)); 
     1489 
     1490        if (pj_ice_strans_has_sess(tp_ice->ice_st)) 
     1491            ii->role = pj_ice_strans_get_role(tp_ice->ice_st); 
     1492        else 
     1493            ii->role = PJ_ICE_SESS_ROLE_UNKNOWN; 
     1494        ii->sess_state = pj_ice_strans_get_state(tp_ice->ice_st); 
     1495        ii->comp_cnt = pj_ice_strans_get_running_comp_cnt(tp_ice->ice_st); 
     1496         
     1497        for (i=1; i<=ii->comp_cnt && i<=PJ_ARRAY_SIZE(ii->comp); ++i) { 
     1498            const pj_ice_sess_check *chk; 
     1499 
     1500            chk = pj_ice_strans_get_valid_pair(tp_ice->ice_st, i); 
     1501            if (chk) { 
     1502                ii->comp[i-1].lcand_type = chk->lcand->type; 
     1503                ii->comp[i-1].rcand_type = chk->rcand->type; 
     1504            } 
     1505        } 
     1506    } 
     1507 
    14761508    return PJ_SUCCESS; 
    14771509} 
Note: See TracChangeset for help on using the changeset viewer.