aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-12-27 09:55:13 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-12-27 10:01:44 +0100
commitb6a3e2be8e1bbb183597399c0dcdaa67022b958e (patch)
treea92f030833e3bd8d61eda610aa388bc3f87ed582 /lib/hostip.h
parent9f64bbd6d88a0a72614bc01ac1842b26a12f9bfd (diff)
c-ares: fix cancelled resolves
When built IPv6-enabled, we could do Curl_done() with one of the two resolves having returned already, so when ares_cancel() is called the resolve callback ends up doing funny things (sometimes resulting in a segfault) since it would try to actually store the previous resolve even though we're shutting down the resolve. This bug was introduced in commit 8ab137b2bc9630ce so it hasn't been included in any public release. Bug: http://curl.haxx.se/bug/view.cgi?id=3145445 Reported by: Pedro Larroy
Diffstat (limited to 'lib/hostip.h')
-rw-r--r--lib/hostip.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index 2f8d4b56c..3f27a2b87 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -70,6 +70,12 @@ struct hostent;
struct SessionHandle;
struct connectdata;
+#ifdef CURLRES_ASYNCH
+void Curl_async_cancel(struct connectdata *conn);
+#else
+#define Curl_async_cancel(x) do {} while(0)
+#endif
+
/*
* 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