Ignore:
Timestamp:
Jun 8, 2016 3:17:45 AM (8 years ago)
Author:
nanang
Message:

Re #422: Added IPv6 support to PJNATH, changes:

  • Deprecated 'pj_ice_strans_cfg.af', if set, the value will be ignored, address family setting is now specified via transport setting, i.e: 'pj_ice_strans_cfg.stun_tp/turn_tp'.
  • Deprecated 'pj_ice_strans_cfg.stun/turn', for backward compatibility, this field value will be checked if 'pj_ice_strans_cfg.stun_tp_cnt/turn_tp_cnt' is set to zero.
  • Added 'pj_ice_strans_stun_cfg' & 'pj_ice_strans_stun_cfg' and the corresponding 'pj_ice_strans_stun/turn_cfg_default()'
  • Added 'pj_ice_strans_cfg.stun_tp/turn_tp' as replacement of 'pj_ice_strans_cfg.stun/turn', it is now an array so app can have multiple STUN/TURN transports.
  • Added macro PJ_ICE_MAX_STUN/TURN to specify maximum number of STUN/TURN transports in each ICE component in compile-time.
  • Miscellaneous: fixed socket number limit in concurrency test in pjnath-test, updated pjsua_media.c to use new 'pj_ice_strans_cfg' setting.
File:
1 edited

Legend:

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

    r5221 r5339  
    397397    /* Initialize transport datas */ 
    398398    for (i=0; i<PJ_ARRAY_SIZE(ice->tp_data); ++i) { 
    399         ice->tp_data[i].transport_id = i; 
     399        ice->tp_data[i].transport_id = 0; 
    400400        ice->tp_data[i].has_req_data = PJ_FALSE; 
    401401    } 
     
    724724    pj_status_t status = PJ_SUCCESS; 
    725725    char address[PJ_INET6_ADDRSTRLEN]; 
     726    unsigned i; 
    726727 
    727728    PJ_ASSERT_RETURN(ice && comp_id &&  
     
    748749        rel_addr = base_addr; 
    749750    pj_memcpy(&lcand->rel_addr, rel_addr, addr_len); 
     751 
     752    /* Update transport data */ 
     753    for (i = 0; i < PJ_ARRAY_SIZE(ice->tp_data); ++i) { 
     754        /* Check if this transport has been registered */ 
     755        if (ice->tp_data[i].transport_id == transport_id) 
     756            break; 
     757 
     758        if (ice->tp_data[i].transport_id == 0) { 
     759            /* Found an empty slot, register this transport here */ 
     760            ice->tp_data[i].transport_id = transport_id; 
     761            break; 
     762        } 
     763    } 
     764    pj_assert(i < PJ_ARRAY_SIZE(ice->tp_data) && 
     765              ice->tp_data[i].transport_id == transport_id); 
    750766 
    751767    pj_ansi_strcpy(ice->tmp.txt, pj_sockaddr_print(&lcand->addr, address, 
Note: See TracChangeset for help on using the changeset viewer.