diff options
author | Yang Tse <yangsita@gmail.com> | 2009-05-17 17:11:28 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-05-17 17:11:28 +0000 |
commit | b7c7bab713e3bfba6626050806c4f4584207be6d (patch) | |
tree | 187cb4e2b9cc48c6588a38cfb3b8a6974f994920 /ahost.c | |
parent | c03c7251c9822de3989513a7b927550f6d7bb757 (diff) | |
download | c-ares-b7c7bab713e3bfba6626050806c4f4584207be6d.tar.gz c-ares-b7c7bab713e3bfba6626050806c4f4584207be6d.tar.bz2 c-ares-b7c7bab713e3bfba6626050806c4f4584207be6d.zip |
Introduction of ares_library_init() and ares_library_cleanup()
Diffstat (limited to 'ahost.c')
-rw-r--r-- | ahost.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -77,6 +77,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; + } + while ((c = ares_getopt(argc,argv,"dt:h")) != -1) { switch (c) @@ -147,6 +154,8 @@ int main(int argc, char **argv) ares_destroy(channel); + ares_library_cleanup(); + #ifdef USE_WINSOCK WSACleanup(); #endif |