aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-11-11 22:36:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-11-11 22:36:00 +0000
commit66eb98bb0a3d171b91c77f8a536011f6b25c1adc (patch)
treedd753011a607a248f3fbfaf946ed8c9883203dfc /lib/hostip.h
parent299546f5c0bd1b8ba5a463efd6f087974ae4633a (diff)
unlock dns cache entries with a function call instead of a variable fiddle
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 2593bc343..78a17e2e8 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -46,10 +46,21 @@ struct Curl_dns_entry {
#endif
};
+/*
+ * Curl_resolv() returns an entry with the info for the specified host
+ * and port.
+ *
+ * The returned data *MUST* be "unlocked" with Curl_resolv_unlock() after
+ * use, or we'll leak memory!
+ */
+
struct Curl_dns_entry *Curl_resolv(struct SessionHandle *data,
char *hostname,
int port);
+/* unlock a previously resolved dns entry */
+#define Curl_resolv_unlock(dns) dns->inuse--
+
/* for debugging purposes only: */
void Curl_scan_cache_used(void *user, void *ptr);