From 2d64cd55a1069ff7fc7e6d8caf5c67353f1ec55f Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sun, 17 May 2009 17:11:28 +0000 Subject: Introduction of ares_library_init() and ares_library_cleanup() --- ares/adig.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ares/adig.c') diff --git a/ares/adig.c b/ares/adig.c index 7df32d9f9..8b5cb2a80 100644 --- a/ares/adig.c +++ b/ares/adig.c @@ -187,6 +187,13 @@ int main(int argc, char **argv) WSAStartup(wVersionRequested, &wsaData); #endif + status = ares_library_init(ARES_LIB_INIT_ALL); + if (status != ARES_SUCCESS) + { + fprintf(stderr, "ares_library_init: %s\n", ares_strerror(status)); + return 1; + } + options.flags = ARES_FLAG_NOCHECKRESP; options.servers = NULL; options.nservers = 0; @@ -325,6 +332,8 @@ int main(int argc, char **argv) ares_destroy(channel); + ares_library_cleanup(); + #ifdef USE_WINSOCK WSACleanup(); #endif -- cgit v1.2.3