break;
case XML_READ_CLASSIFIER:
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");
+ ud->state = XML_ERROR;
+ return;
+ }
+ ud->cfg->classifiers = g_list_prepend (ud->cfg->classifiers, ccf);
+ }
break;
case XML_READ_STATFILE:
CHECK_TAG ("statfile", FALSE);
/* Iterate through variables */
g_hash_table_foreach (cfg->factors, xml_factors_callback, (gpointer)f);
+ /* Grow factor */
+ fprintf (f, " <grow_factor>%.2f</grow_factor>" EOL, cfg->grow_factor);
+
/* Print footer comment */
fprintf (f, "</factors>" EOL "<!-- End of factors section -->" EOL EOL);
}
l = g_list_next (l);
}
+ init_lua_filters (rspamd->cfg);
init_metrics_cache (rspamd->cfg);
msg_info ("config rereaded successfully");
}