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:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user