Changeset 5382
- Timestamp:
- Jul 14, 2016 4:37:37 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_core.c
r5327 r5382 2152 2152 status = pjstun_get_mapped_addr2(&pjsua_var.cp.factory, &stun_opt, 2153 2153 1, &sock, &p_pub_addr->ipv4); 2154 if (status != PJ_SUCCESS && !pjsua_var.ua_cfg.stun_ignore_failure) { 2154 if (status != PJ_SUCCESS) { 2155 /* Failed getting mapped address via STUN */ 2155 2156 pjsua_perror(THIS_FILE, "Error contacting STUN server", status); 2156 pj_sock_close(sock); 2157 return status; 2157 2158 /* Return error if configured to not ignore STUN failure */ 2159 if (!pjsua_var.ua_cfg.stun_ignore_failure) { 2160 pj_sock_close(sock); 2161 return status; 2162 } 2163 2164 /* Otherwise, just use host IP */ 2165 pj_sockaddr_init(af, p_pub_addr, NULL, (pj_uint16_t)port); 2166 status = pj_gethostip(af, p_pub_addr); 2167 if (status != PJ_SUCCESS) { 2168 pjsua_perror(THIS_FILE, "Unable to get local host IP", status); 2169 pj_sock_close(sock); 2170 return status; 2171 } 2158 2172 } 2159 2173
Note: See TracChangeset
for help on using the changeset viewer.