1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-10-06 03:09:40 +00:00

Make ares_init(), ares_dup() and ares_init_options() return ARES_ENOTINITIALIZED

if library initialization has not been performed calling ares_library_init().
This commit is contained in:
Yang Tse
2009-05-26 18:00:14 +00:00
parent 84aa2f8a5d
commit cf3301f024
9 changed files with 46 additions and 9 deletions

View File

@ -120,3 +120,14 @@ void ares_library_cleanup(void)
ares_init_flags = ARES_LIB_INIT_NONE;
}
int ares_library_initialized(void)
{
#ifdef WIN32
if (!ares_initialized)
return ARES_ENOTINITIALIZED;
#endif
return ARES_SUCCESS;
}