]> source.dussan.org Git - rspamd.git/commitdiff
Set a sane quark for configtest to avoid NULL
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 30 Jan 2016 09:45:55 +0000 (10:45 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 30 Jan 2016 09:45:55 +0000 (10:45 +0100)
src/rspamadm/configtest.c

index d1154f49c5769463fff4af938c872f70a161778c..cd62de7c2a2f96a09a19728703160f9ea9b16bc1 100644 (file)
@@ -81,6 +81,7 @@ static void
 config_logger (rspamd_mempool_t *pool, gpointer ud)
 {
        struct rspamd_main *rm = ud;
+       GQuark configtest_quark = g_quark_from_static_string ("configtest");
 
        rm->cfg->log_type = RSPAMD_LOG_CONSOLE;
 
@@ -91,7 +92,7 @@ config_logger (rspamd_mempool_t *pool, gpointer ud)
                rm->cfg->log_level = G_LOG_LEVEL_WARNING;
        }
 
-       rspamd_set_logger (rm->cfg, g_quark_try_string ("main"), rm);
+       rspamd_set_logger (rm->cfg, configtest_quark, rm);
        if (rspamd_log_open_priv (rm->logger, rm->workers_uid, rm->workers_gid) ==
                        -1) {
                fprintf (stderr, "Fatal error, cannot open logfile, exiting\n");