aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_xml.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-07-13 13:07:45 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-07-13 13:07:45 +0400
commit091e84951a2b032bb2930b300ffe43eaf01a304e (patch)
tree5d5992bb7de97fdb20c04bda9fff013fbe134c82 /src/cfg_xml.c
parentc6d62c095bc27aebd6c5f8dc9716467ae147fb68 (diff)
downloadrspamd-091e84951a2b032bb2930b300ffe43eaf01a304e.tar.gz
rspamd-091e84951a2b032bb2930b300ffe43eaf01a304e.zip
Add validity detector for statfiles inside classifier.
Add euristic to detect spam/ham classes based on statfile symbol.
Diffstat (limited to 'src/cfg_xml.c')
-rw-r--r--src/cfg_xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cfg_xml.c b/src/cfg_xml.c
index 6953edb3a..bb23dd641 100644
--- a/src/cfg_xml.c
+++ b/src/cfg_xml.c
@@ -1790,8 +1790,8 @@ rspamd_xml_end_element (GMarkupParseContext *context, const gchar *element_name,
CHECK_TAG ("classifier", FALSE);
if (res) {
ccf = ud->section_pointer;
- if (ccf->statfiles == NULL) {
- *error = g_error_new (xml_error_quark (), XML_PARAM_MISSING, "classifier cannot contains no statfiles");
+ if (ccf->statfiles == NULL || !check_classifier_statfiles (ccf)) {
+ *error = g_error_new (xml_error_quark (), XML_PARAM_MISSING, "classifier cannot contains no statfiles or statfiles of the same class");
ud->state = XML_ERROR;
return;
}