Changeset 5283
- Timestamp:
- May 9, 2016 6:58:29 AM (9 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h
r5273 r5283 1578 1578 1579 1579 /** 1580 * This specifies if the library s tartup should ignore failure with the1580 * This specifies if the library should ignore failure with the 1581 1581 * STUN servers. If this is set to PJ_FALSE, the library will refuse to 1582 1582 * start if it fails to resolve or contact any of the STUN servers. -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5241 r5283 2053 2053 status = pjstun_get_mapped_addr2(&pjsua_var.cp.factory, &stun_opt, 2054 2054 1, &sock, &p_pub_addr->ipv4); 2055 if (status != PJ_SUCCESS ) {2055 if (status != PJ_SUCCESS && !pjsua_var.ua_cfg.stun_ignore_failure) { 2056 2056 pjsua_perror(THIS_FILE, "Error contacting STUN server", status); 2057 2057 pj_sock_close(sock); -
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c
r5282 r5283 391 391 #endif 392 392 if (status != PJ_SUCCESS) { 393 pjsua_perror(THIS_FILE, "STUN resolve error", status); 394 goto on_error; 393 if (!pjsua_var.ua_cfg.stun_ignore_failure) { 394 pjsua_perror(THIS_FILE, "STUN resolve error", status); 395 goto on_error; 396 } 397 398 PJ_LOG(4,(THIS_FILE, "Ignoring STUN resolve error %d", 399 status)); 400 401 if (!pj_sockaddr_has_addr(&bound_addr)) { 402 pj_sockaddr addr; 403 404 /* Get local IP address. */ 405 status = pj_gethostip(af, &addr); 406 if (status != PJ_SUCCESS) 407 goto on_error; 408 409 pj_sockaddr_copy_addr(&bound_addr, &addr); 410 } 411 412 for (i=0; i<2; ++i) { 413 pj_sockaddr_init(af, &mapped_addr[i], NULL, 0); 414 pj_sockaddr_copy_addr(&mapped_addr[i], &bound_addr); 415 pj_sockaddr_set_port(&mapped_addr[i], 416 (pj_uint16_t)(acc->next_rtp_port+i)); 417 } 418 break; 395 419 } 396 420
Note: See TracChangeset
for help on using the changeset viewer.