aboutsummaryrefslogtreecommitdiffstats
path: root/src/rspamadm
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-27 13:53:48 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-27 13:53:48 +0000
commit65965fabad7969eb1d87df659679b73437415f52 (patch)
tree523adb3e5085bb90dcd8c434b8d73db0bc45b324 /src/rspamadm
parent085b3707cbddc9601b3dd8f5953c74d299cac2d4 (diff)
downloadrspamd-65965fabad7969eb1d87df659679b73437415f52.tar.gz
rspamd-65965fabad7969eb1d87df659679b73437415f52.zip
Fix initialization order
Diffstat (limited to 'src/rspamadm')
-rw-r--r--src/rspamadm/configdump.c11
-rw-r--r--src/rspamadm/configtest.c9
2 files changed, 12 insertions, 8 deletions
diff --git a/src/rspamadm/configdump.c b/src/rspamadm/configdump.c
index e40f2f34a..1e169f791 100644
--- a/src/rspamadm/configdump.c
+++ b/src/rspamadm/configdump.c
@@ -28,6 +28,7 @@
#include "cfg_rcl.h"
#include "utlist.h"
#include "rspamd.h"
+#include "lua/lua_common.h"
static gboolean json = FALSE;
static gboolean compact = FALSE;
@@ -173,15 +174,15 @@ rspamadm_configdump (gint argc, gchar **argv)
}
else {
/* Do post-load actions */
- rspamd_config_post_load (cfg, FALSE);
- ret = TRUE;
- }
-
- if (ret) {
+ rspamd_lua_post_load_config (cfg);
if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) {
ret = FALSE;
}
+
+ if (ret) {
+ ret = rspamd_config_post_load (cfg, FALSE);
+ }
}
if (ret) {
diff --git a/src/rspamadm/configtest.c b/src/rspamadm/configtest.c
index 7f2d1737f..9c8353312 100644
--- a/src/rspamadm/configtest.c
+++ b/src/rspamadm/configtest.c
@@ -27,6 +27,7 @@
#include "cfg_file.h"
#include "cfg_rcl.h"
#include "rspamd.h"
+#include "lua/lua_common.h"
static gboolean quiet = FALSE;
static gchar *config = NULL;
@@ -150,10 +151,8 @@ rspamadm_configtest (gint argc, gchar **argv)
}
else {
/* Do post-load actions */
- ret = rspamd_config_post_load (cfg, FALSE);
- }
+ rspamd_lua_post_load_config (cfg);
- if (ret) {
if (!rspamd_init_filters (rspamd_main->cfg, FALSE)) {
ret = FALSE;
}
@@ -162,6 +161,10 @@ rspamadm_configtest (gint argc, gchar **argv)
FALSE)) {
ret = FALSE;
}
+
+ if (ret) {
+ ret = rspamd_config_post_load (cfg, FALSE);
+ }
}
if (strict && ret) {