move Curl_share_lock and ref counting into Curl_fetch_addr

This commit is contained in:
Stefan Bühler 2015-03-17 09:26:36 +01:00 committed by Daniel Stenberg
parent 0db831976e
commit b4be97fb67
3 changed files with 55 additions and 27 deletions

View file

@ -174,6 +174,9 @@ const char *Curl_printable_address(const Curl_addrinfo *ip,
* Curl_fetch_addr() fetches a 'Curl_dns_entry' already in the DNS cache.
*
* Returns the Curl_dns_entry entry pointer or NULL if not in the cache.
*
* The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after
* use, or we'll leak memory!
*/
struct Curl_dns_entry *
Curl_fetch_addr(struct connectdata *conn,