Changeset 5297 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
- Timestamp:
- May 13, 2016 10:56:48 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5283 r5297 390 390 else 391 391 #endif 392 393 if (status != PJ_SUCCESS && pjsua_var.ua_cfg.stun_srv_cnt > 1 && 394 ((acc->cfg.media_stun_use & PJSUA_STUN_RETRY_ON_FAILURE)!=0)) 395 { 396 PJ_LOG(4,(THIS_FILE, "Failed to get STUN mapped address, " 397 "retrying other STUN servers")); 398 status=pjsua_update_stun_servers(pjsua_var.ua_cfg.stun_srv_cnt, 399 pjsua_var.ua_cfg.stun_srv, 400 PJ_TRUE); 401 if (status == PJ_SUCCESS) { 402 if (pjsua_var.stun_srv.addr.sa_family != 0) { 403 pj_ansi_strcpy(ip_addr, 404 pj_inet_ntoa(pjsua_var.stun_srv.ipv4.sin_addr)); 405 stun_srv = pj_str(ip_addr); 406 } else { 407 stun_srv.slen = 0; 408 } 409 410 stun_opt.srv1 = stun_opt.srv2 = stun_srv; 411 stun_opt.port1 = stun_opt.port2 = 412 pj_ntohs(pjsua_var.stun_srv.ipv4.sin_port); 413 status = pjstun_get_mapped_addr2(&pjsua_var.cp.factory, 414 &stun_opt, 2, sock, 415 resolved_addr); 416 } 417 } 418 392 419 if (status != PJ_SUCCESS) { 393 420 if (!pjsua_var.ua_cfg.stun_ignore_failure) {
Note: See TracChangeset
for help on using the changeset viewer.