From defcd82bfd954693cdcd1767227bfcf04e63ff59 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 13 Jan 2016 20:08:49 +0000 Subject: [PATCH] Do not treat bad backend as an assert --- src/libstat/stat_config.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libstat/stat_config.c b/src/libstat/stat_config.c index 5e1a8672b..0a19f0554 100644 --- a/src/libstat/stat_config.c +++ b/src/libstat/stat_config.c @@ -130,7 +130,13 @@ rspamd_stat_init (struct rspamd_config *cfg, struct event_base *ev_base) while (cur) { clf = cur->data; bk = rspamd_stat_get_backend (clf->backend); - g_assert (bk != NULL); + + if (bk == NULL) { + msg_err_config ("cannot get backend of type %s, so disable classifier" + " completely", clf->backend, clf->name); + cur = g_list_next (cur); + continue; + } /* XXX: * Here we get the first classifier tokenizer config as the only one -- 2.39.5