- Timestamp:
- Dec 28, 2016 3:40:07 AM (8 years ago)
- Location:
- pjproject/branches/projects/uwp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/uwp
- Property svn:mergeinfo changed
/pjproject/trunk (added) merged: 5209,5212-5234,5237-5253,5255,5257-5292,5294-5297,5299-5332,5334-5394,5396-5438,5440-5469,5471-5496,5498-5510
- Property svn:mergeinfo changed
-
pjproject/branches/projects/uwp/pjnath/src/pjnath/stun_sock.c
r4712 r5513 417 417 pj_assert(stun_sock->q == NULL); 418 418 419 opt = PJ_DNS_SRV_FALLBACK_A; 420 if (stun_sock->af == pj_AF_INET6()) { 421 opt |= (PJ_DNS_SRV_RESOLVE_AAAA | PJ_DNS_SRV_FALLBACK_AAAA); 422 } 419 /* Init DNS resolution option */ 420 if (stun_sock->af == pj_AF_INET6()) 421 opt = (PJ_DNS_SRV_RESOLVE_AAAA_ONLY | PJ_DNS_SRV_FALLBACK_AAAA); 422 else 423 opt = PJ_DNS_SRV_FALLBACK_A; 423 424 424 425 status = pj_dns_srv_resolve(domain, &res_name, default_port, … … 436 437 437 438 status = pj_getaddrinfo(stun_sock->af, domain, &cnt, &ai); 438 if (status != PJ_SUCCESS) 439 if (cnt == 0) 440 status = PJ_EAFNOTSUP; 441 442 if (status != PJ_SUCCESS) { 443 pj_grp_lock_release(stun_sock->grp_lock); 439 444 return status; 445 } 440 446 441 447 pj_sockaddr_cp(&stun_sock->srv_addr, &ai.ai_addr); … … 573 579 pj_assert(rec->count); 574 580 pj_assert(rec->entry[0].server.addr_count); 575 576 PJ_TODO(SUPPORT_IPV6_IN_RESOLVER); 577 pj_assert(stun_sock->af == pj_AF_INET()); 581 pj_assert(rec->entry[0].server.addr[0].af == stun_sock->af); 578 582 579 583 /* Set the address */ 580 pj_sockaddr_in_init(&stun_sock->srv_addr.ipv4, NULL, 581 rec->entry[0].port); 582 stun_sock->srv_addr.ipv4.sin_addr = rec->entry[0].server.addr[0]; 584 pj_sockaddr_init(stun_sock->af, &stun_sock->srv_addr, NULL, 585 rec->entry[0].port); 586 if (stun_sock->af == pj_AF_INET6()) { 587 stun_sock->srv_addr.ipv6.sin6_addr = 588 rec->entry[0].server.addr[0].ip.v6; 589 } else { 590 stun_sock->srv_addr.ipv4.sin_addr = 591 rec->entry[0].server.addr[0].ip.v4; 592 } 583 593 584 594 /* Start sending Binding request */
Note: See TracChangeset
for help on using the changeset viewer.