Logging: add commands to runtime view/enable/disable logging
[citadel.git] / citadel / modules / c-ares-dns / serv_c-ares-dns.c
index 13e156a80879a3ecb17ceb7e8e318d839a59cea9..0f5c004ee14e13d2aaf2c66a73e36607e94ebdf2 100644 (file)
@@ -610,16 +610,16 @@ void SockStateCb(void *data, int sock, int read, int write)
                ev_io_stop(event_base, &IO->DNS.send_event);
        }
 }
-void EnableDebugCAres(void)
+void EnableDebugCAres(const int n)
 {
-       DebugCAres = 1;
+       DebugCAres = n;
 }
 
 CTDL_MODULE_INIT(c_ares_client)
 {
        if (!threading)
        {
-               CtdlRegisterDebugFlagHook(HKEY("cares"), EnableDebugCAres);
+               CtdlRegisterDebugFlagHook(HKEY("cares"), EnableDebugCAres, &DebugCAres);
                int r = ares_library_init(ARES_LIB_INIT_ALL);
                if (0 != r) {