Ignore:
Timestamp:
Feb 7, 2013 9:35:34 AM (12 years ago)
Author:
nanang
Message:

Close #1602: configurable local port range for ICE transport.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r4342 r4343  
    719719        ice_cfg.stun.max_host_cands = acc_cfg->ice_cfg.ice_max_host_cands; 
    720720 
     721    /* Copy binding port setting to STUN setting */ 
     722    pj_sockaddr_init(ice_cfg.af, &ice_cfg.stun.cfg.bound_addr, 
     723                     &cfg->bound_addr, cfg->port); 
     724    ice_cfg.stun.cfg.port_range = cfg->port_range; 
     725    if (cfg->port != 0 && ice_cfg.stun.cfg.port_range == 0) 
     726        ice_cfg.stun.cfg.port_range = pjsua_var.ua_cfg.max_calls * 10; 
     727 
    721728    /* Copy QoS setting to STUN setting */ 
    722729    ice_cfg.stun.cfg.qos_type = cfg->qos_type; 
     
    744751        pj_memcpy(&ice_cfg.turn.cfg.qos_params, &cfg->qos_params, 
    745752                  sizeof(cfg->qos_params)); 
     753 
     754        /* Copy binding port setting to TURN setting */ 
     755        pj_sockaddr_init(ice_cfg.af, &ice_cfg.turn.cfg.bound_addr, 
     756                         &cfg->bound_addr, cfg->port); 
     757        ice_cfg.turn.cfg.port_range = cfg->port_range; 
     758        if (cfg->port != 0 && ice_cfg.turn.cfg.port_range == 0) 
     759            ice_cfg.turn.cfg.port_range = pjsua_var.ua_cfg.max_calls * 10; 
    746760    } 
    747761 
Note: See TracChangeset for help on using the changeset viewer.