mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:53:33 +03:00
parent
793157c51b
commit
acca40c9b5
7 changed files with 63 additions and 28 deletions
26
lib/hostip.c
26
lib/hostip.c
|
|
@ -121,19 +121,6 @@
|
|||
|
||||
static void freednsentry(void *freethis);
|
||||
|
||||
/*
|
||||
* Return # of addresses in a Curl_addrinfo struct
|
||||
*/
|
||||
static int num_addresses(const struct Curl_addrinfo *addr)
|
||||
{
|
||||
int i = 0;
|
||||
while(addr) {
|
||||
addr = addr->ai_next;
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_printable_address() stores a printable version of the 1st address
|
||||
* given in the 'ai' argument. The result will be stored in the buf that is
|
||||
|
|
@ -388,6 +375,19 @@ Curl_fetch_addr(struct Curl_easy *data,
|
|||
}
|
||||
|
||||
#ifndef CURL_DISABLE_SHUFFLE_DNS
|
||||
/*
|
||||
* Return # of addresses in a Curl_addrinfo struct
|
||||
*/
|
||||
static int num_addresses(const struct Curl_addrinfo *addr)
|
||||
{
|
||||
int i = 0;
|
||||
while(addr) {
|
||||
addr = addr->ai_next;
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
|
||||
struct Curl_addrinfo **addr);
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue