Changeset 6015
- Timestamp:
- May 29, 2019 8:02:02 AM (5 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r5962 r6015 315 315 pj_bool_t is_restarting; 316 316 pj_status_t restart_status; 317 pj_bool_t has_bound_addr; 317 318 } pjsua_transport_data; 318 319 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_acc.c
r6004 r6015 3293 3293 return status; 3294 3294 3295 /* Set this as default return value. This may be changed below 3296 * for TCP/TLS 3297 */ 3295 /* Set this as default return value. This may be changed below. */ 3298 3296 addr->host = tfla2_prm.ret_addr; 3299 3297 addr->port = tfla2_prm.ret_port; … … 3316 3314 acc->via_tp = (pjsip_transport *)tfla2_prm.ret_tp; 3317 3315 } 3316 } else 3317 /* For UDP transport, check if we need to overwrite the address 3318 * with its bound address. 3319 */ 3320 if ((flag & PJSIP_TRANSPORT_DATAGRAM) && tfla2_prm.local_if && 3321 tfla2_prm.ret_tp) 3322 { 3323 int i; 3324 3325 for (i = 0; i < sizeof(pjsua_var.tpdata); i++) { 3326 if (tfla2_prm.ret_tp==(const void *)pjsua_var.tpdata[i].data.tp) { 3327 if (pjsua_var.tpdata[i].has_bound_addr) { 3328 pj_strdup(acc->pool, &addr->host, 3329 &pjsua_var.tpdata[i].data.tp->local_name.host); 3330 addr->port = (pj_uint16_t) 3331 pjsua_var.tpdata[i].data.tp->local_name.port; 3332 } 3333 break; 3334 } 3335 } 3318 3336 } 3319 3337 -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r6004 r6015 2507 2507 pjsua_var.tpdata[id].local_name = tp->local_name; 2508 2508 pjsua_var.tpdata[id].data.tp = tp; 2509 if (cfg->bound_addr.slen) 2510 pjsua_var.tpdata[id].has_bound_addr = PJ_TRUE; 2509 2511 2510 2512 #if defined(PJ_HAS_TCP) && PJ_HAS_TCP!=0
Note: See TracChangeset
for help on using the changeset viewer.