Take in account c-ares 1.6.1 introduces ares_library_init() and ares_library_cleanup()
This commit is contained in:
parent
2d64cd55a1
commit
13db2916de
11
lib/easy.c
11
lib/easy.c
@ -280,6 +280,13 @@ CURLcode curl_global_init(long flags)
|
|||||||
idna_init();
|
idna_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(USE_ARES) && defined(ARES_VERSION) && (ARES_VERSION >= 0x010601)
|
||||||
|
If(ares_library_init(ARES_LIB_INIT_ALL)) {
|
||||||
|
DEBUGF(fprintf(stderr, "Error: ares_library_init failed\n"));
|
||||||
|
return CURLE_FAILED_INIT;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
init_flags = flags;
|
init_flags = flags;
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
@ -333,6 +340,10 @@ void curl_global_cleanup(void)
|
|||||||
if(init_flags & CURL_GLOBAL_SSL)
|
if(init_flags & CURL_GLOBAL_SSL)
|
||||||
Curl_ssl_cleanup();
|
Curl_ssl_cleanup();
|
||||||
|
|
||||||
|
#if defined(USE_ARES) && defined(ARES_VERSION) && (ARES_VERSION >= 0x010601)
|
||||||
|
ares_library_cleanup();
|
||||||
|
#endif
|
||||||
|
|
||||||
if(init_flags & CURL_GLOBAL_WIN32)
|
if(init_flags & CURL_GLOBAL_WIN32)
|
||||||
win32_cleanup();
|
win32_cleanup();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user