mirror of
https://github.com/curl/curl.git
synced 2026-08-25 05:23:32 +03:00
Introduction of ares_library_init() and ares_library_cleanup()
This commit is contained in:
parent
60a6af7498
commit
2d64cd55a1
9 changed files with 75 additions and 28 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue