]> source.dussan.org Git - rspamd.git/commitdiff
Do not treat bad backend as an assert
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 Jan 2016 20:08:49 +0000 (20:08 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 13 Jan 2016 20:08:49 +0000 (20:08 +0000)
src/libstat/stat_config.c

index 5e1a8672b5ad18bd6498f7ebe3e92d2c58ae7836..0a19f05542490d1a07cc386094ae6c057ede4666 100644 (file)
@@ -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