Changeset 5839
- Timestamp:
- Jul 25, 2018 11:56:39 PM (6 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua_internal.h
r5828 r5839 453 453 pjsua_stun_resolve stun_res; /**< List of pending STUN resolution*/ 454 454 unsigned stun_srv_idx; /**< Resolved STUN server index */ 455 unsigned stun_opt; /**< STUN resolution option. */ 455 456 pj_dns_resolver *resolver; /**< DNS resolver. */ 456 457 … … 624 625 */ 625 626 /* Resolve the STUN server */ 626 pj_status_t resolve_stun_server(pj_bool_t wait, pj_bool_t retry_if_cur_error); 627 pj_status_t resolve_stun_server(pj_bool_t wait, pj_bool_t retry_if_cur_error, 628 unsigned options); 627 629 628 630 /** -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5833 r5839 1125 1125 1126 1126 /* Start resolving STUN server */ 1127 status = resolve_stun_server(PJ_FALSE, PJ_FALSE );1127 status = resolve_stun_server(PJ_FALSE, PJ_FALSE, 0); 1128 1128 if (status != PJ_SUCCESS && status != PJ_EPENDING) { 1129 1129 pjsua_perror(THIS_FILE, "Error resolving STUN server", status); … … 1453 1453 pj_assert(sess->idx < sess->count); 1454 1454 1455 if (pjsua_var.ua_cfg.stun_try_ipv6 && 1456 pjsua_var.stun_opt != PJSUA_NAT64_DISABLED && 1457 sess->af == pj_AF_INET()) 1458 { 1459 /* Skip IPv4 STUN resolution if NAT64 is not disabled. */ 1460 continue; 1461 } 1462 1455 1463 pj_ansi_snprintf(target, sizeof(target), "%.*s", 1456 1464 (int)sess->srv[sess->idx].slen, … … 1549 1557 PJSUA_UNLOCK(); 1550 1558 1551 status = resolve_stun_server(wait, PJ_FALSE );1559 status = resolve_stun_server(wait, PJ_FALSE, 0); 1552 1560 if (wait == PJ_FALSE && status == PJ_EPENDING) 1553 1561 status = PJ_SUCCESS; … … 1693 1701 * Resolve STUN server. 1694 1702 */ 1695 pj_status_t resolve_stun_server(pj_bool_t wait, pj_bool_t retry_if_cur_error) 1696 { 1703 pj_status_t resolve_stun_server(pj_bool_t wait, pj_bool_t retry_if_cur_error, 1704 unsigned options) 1705 { 1706 pjsua_var.stun_opt = options; 1707 1697 1708 /* Retry resolving if currently the STUN status is error */ 1698 1709 if (pjsua_var.stun_status != PJ_EPENDING && … … 2195 2206 2196 2207 /* Make sure STUN server resolution has completed */ 2197 status = resolve_stun_server(PJ_TRUE, PJ_TRUE );2208 status = resolve_stun_server(PJ_TRUE, PJ_TRUE, 0); 2198 2209 if (status != PJ_SUCCESS) { 2199 2210 pjsua_perror(THIS_FILE, "Error resolving STUN server", status); … … 3103 3114 3104 3115 /* Make sure STUN server resolution has completed */ 3105 status = resolve_stun_server(PJ_TRUE, PJ_TRUE );3116 status = resolve_stun_server(PJ_TRUE, PJ_TRUE, 0); 3106 3117 if (status != PJ_SUCCESS) { 3107 3118 pjsua_var.nat_status = status; -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5825 r5839 270 270 PJSUA_STUN_RETRY_ON_FAILURE) == 271 271 PJSUA_STUN_RETRY_ON_FAILURE; 272 status = resolve_stun_server(PJ_TRUE, retry_stun); 272 status = resolve_stun_server(PJ_TRUE, retry_stun, 273 (unsigned)acc->cfg.nat64_opt); 273 274 if (status != PJ_SUCCESS) { 274 275 pjsua_perror(THIS_FILE, "Error resolving STUN server", status); … … 861 862 PJSUA_STUN_RETRY_ON_FAILURE) == 862 863 PJSUA_STUN_RETRY_ON_FAILURE; 863 status = resolve_stun_server(PJ_TRUE, retry_stun); 864 status = resolve_stun_server(PJ_TRUE, retry_stun, 865 (unsigned)acc_cfg->nat64_opt); 864 866 if (status != PJ_SUCCESS) { 865 867 pjsua_perror(THIS_FILE, "Error resolving STUN server", status);
Note: See TracChangeset
for help on using the changeset viewer.