mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
evutil: drop force_check from evutil_check_interfaces() (unused)
(cherry picked from commit 4f6fc092b3ee0b996b50df3c0d22b356f0a9236c)
This commit is contained in:
parent
ef498aa25d
commit
a09265aca0
6
evutil.c
6
evutil.c
@ -750,7 +750,7 @@ done:
|
|||||||
/* Test whether we have an ipv4 interface and an ipv6 interface. Return 0 if
|
/* Test whether we have an ipv4 interface and an ipv6 interface. Return 0 if
|
||||||
* the test seemed successful. */
|
* the test seemed successful. */
|
||||||
static int
|
static int
|
||||||
evutil_check_interfaces(int force_recheck)
|
evutil_check_interfaces(void)
|
||||||
{
|
{
|
||||||
evutil_socket_t fd = -1;
|
evutil_socket_t fd = -1;
|
||||||
struct sockaddr_in sin, sin_out;
|
struct sockaddr_in sin, sin_out;
|
||||||
@ -758,7 +758,7 @@ evutil_check_interfaces(int force_recheck)
|
|||||||
ev_socklen_t sin_out_len = sizeof(sin_out);
|
ev_socklen_t sin_out_len = sizeof(sin_out);
|
||||||
ev_socklen_t sin6_out_len = sizeof(sin6_out);
|
ev_socklen_t sin6_out_len = sizeof(sin6_out);
|
||||||
int r;
|
int r;
|
||||||
if (have_checked_interfaces && !force_recheck)
|
if (have_checked_interfaces)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* From this point on we have done the ipv4/ipv6 interface check */
|
/* From this point on we have done the ipv4/ipv6 interface check */
|
||||||
@ -1231,7 +1231,7 @@ evutil_adjust_hints_for_addrconfig_(struct evutil_addrinfo *hints)
|
|||||||
return;
|
return;
|
||||||
if (hints->ai_family != PF_UNSPEC)
|
if (hints->ai_family != PF_UNSPEC)
|
||||||
return;
|
return;
|
||||||
evutil_check_interfaces(0);
|
evutil_check_interfaces();
|
||||||
if (had_ipv4_address && !had_ipv6_address) {
|
if (had_ipv4_address && !had_ipv6_address) {
|
||||||
hints->ai_family = PF_INET;
|
hints->ai_family = PF_INET;
|
||||||
} else if (!had_ipv4_address && had_ipv6_address) {
|
} else if (!had_ipv4_address && had_ipv6_address) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user