summaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-01-15 22:15:55 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-01-15 22:15:55 +0000
commit56f17d2c9f3d229d701bcf0dda83f4d29c0e02ba (patch)
treeda73dc3c74a6b29c4c0894a15aa263a88a7fd31a /lib/hostip.h
parent19ae96f4d0086f45705a6d4e106e1f66ab03baf7 (diff)
downloadcurl-56f17d2c9f3d229d701bcf0dda83f4d29c0e02ba.tar.gz
I made the torture test on test 530 go through. This was actually due to
silly code left from when we switched to let the multi handle "hold" the dns cache when using the multi interface... Of course this only triggered when a certain function call returned error at the correct moment.
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 53093c169..a7e0988a2 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -125,11 +125,19 @@ struct hostent;
struct SessionHandle;
struct connectdata;
-void Curl_global_host_cache_init(void);
+/*
+ * Curl_global_host_cache_init() initializes and sets up a global DNS cache.
+ * Global DNS cache is general badness. Do not use. This will be removed in
+ * a future version. Use the share interface instead!
+ *
+ * Returns 0 on success, 1 on failure.
+ */
+int Curl_global_host_cache_init(void);
void Curl_global_host_cache_dtor(void);
struct curl_hash *Curl_global_host_cache_get(void);
-#define Curl_global_host_cache_use(__p) ((__p)->set.global_dns_cache)
+#define Curl_global_host_cache_use(__p) \
+ ((__p)->dns.hostcachetype == HCACHE_GLOBAL)
struct Curl_dns_entry {
Curl_addrinfo *addr;