aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_utils.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-10-26 15:25:10 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-10-26 15:25:10 +0100
commit2aed6c7470135378c682308250c23a02f1c74b20 (patch)
treed1189f134c75a267eafad922399a114bd9909306 /src/cfg_utils.c
parent75d0aa0852dd9bdff2470b3acd54d918bbca89ae (diff)
downloadrspamd-2aed6c7470135378c682308250c23a02f1c74b20.tar.gz
rspamd-2aed6c7470135378c682308250c23a02f1c74b20.zip
Fix metric setup from ucl.
Diffstat (limited to 'src/cfg_utils.c')
-rw-r--r--src/cfg_utils.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cfg_utils.c b/src/cfg_utils.c
index dcc0bf746..d41f364ba 100644
--- a/src/cfg_utils.c
+++ b/src/cfg_utils.c
@@ -961,10 +961,10 @@ read_xml_config (struct config_file *cfg, const gchar *filename)
struct stat st;
gint fd;
gchar *data, *rcl;
- gboolean res;
GMarkupParseContext *ctx;
GError *err = NULL;
struct rspamd_rcl_section *top;
+ gboolean res;
struct rspamd_xml_userdata ud;
@@ -996,7 +996,13 @@ read_xml_config (struct config_file *cfg, const gchar *filename)
top = rspamd_rcl_config_init ();
- return rspamd_read_rcl_config (top, cfg, cfg->rcl_obj, &err);
+ err = NULL;
+ if (!res || !rspamd_read_rcl_config (top, cfg, cfg->rcl_obj, &err)) {
+ msg_err ("rcl parse error: %s", err->message);
+ return FALSE;
+ }
+
+ return TRUE;
}
static void