Changeset 6045 for pjproject/trunk/pjnath/src/pjnath/stun_sock.c
- Timestamp:
- Jul 26, 2019 9:32:14 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/src/pjnath/stun_sock.c
r5997 r6045 683 683 } else { 684 684 pj_sockaddr def_addr; 685 pj_uint16_t port = pj_sockaddr_get_port(&info->bound_addr); 685 pj_uint16_t port = pj_sockaddr_get_port(&info->bound_addr); 686 pj_enum_ip_option enum_opt; 686 687 unsigned i; 687 688 … … 698 699 699 700 /* Enum all IP interfaces in the host */ 701 pj_enum_ip_option_default(&enum_opt); 702 enum_opt.af = stun_sock->af; 703 enum_opt.omit_deprecated_ipv6 = PJ_TRUE; 700 704 info->alias_cnt = PJ_ARRAY_SIZE(info->aliases); 701 status = pj_enum_ip_interface(stun_sock->af, &info->alias_cnt, 702 info->aliases); 705 status = pj_enum_ip_interface2(&enum_opt, &info->alias_cnt, 706 info->aliases); 707 if (status == PJ_ENOTSUP) { 708 /* Try again without omitting deprecated IPv6 addresses */ 709 enum_opt.omit_deprecated_ipv6 = PJ_FALSE; 710 status = pj_enum_ip_interface2(&enum_opt, &info->alias_cnt, 711 info->aliases); 712 } 713 703 714 if (status != PJ_SUCCESS) { 704 715 /* If enumeration fails, just return the default address */
Note: See TracChangeset
for help on using the changeset viewer.