mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:03:32 +03:00
Sterling Hughes' provided initial DNS cache source code.
This commit is contained in:
parent
6aaee5f23b
commit
6de7dc5879
11 changed files with 648 additions and 29 deletions
|
|
@ -210,11 +210,11 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||
in_addr_t in;
|
||||
|
||||
if(Curl_if2ip(data->set.device, myhost, sizeof(myhost))) {
|
||||
h = Curl_getaddrinfo(data, myhost, 0, &hostdataptr);
|
||||
h = Curl_resolv(data, myhost, 0, &hostdataptr);
|
||||
}
|
||||
else {
|
||||
if(strlen(data->set.device)>1) {
|
||||
h = Curl_getaddrinfo(data, data->set.device, 0, &hostdataptr);
|
||||
h = Curl_resolv(data, data->set.device, 0, &hostdataptr);
|
||||
}
|
||||
if(h) {
|
||||
/* we know data->set.device is shorter than the myhost array */
|
||||
|
|
@ -229,8 +229,6 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||
hostent_buf,
|
||||
sizeof(hostent_buf));
|
||||
*/
|
||||
if(hostdataptr)
|
||||
free(hostdataptr); /* allocated by Curl_getaddrinfo() */
|
||||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
|
||||
|
|
@ -304,9 +302,6 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||
return CURLE_HTTP_PORT_FAILED;
|
||||
}
|
||||
|
||||
if(hostdataptr)
|
||||
free(hostdataptr); /* allocated by Curl_getaddrinfo() */
|
||||
|
||||
return CURLE_OK;
|
||||
|
||||
} /* end of device selection support */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue