aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-19 18:35:44 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-12-19 18:35:44 +0000
commite325da73310bc36c61d318f587bbd7655781bd12 (patch)
tree586d60bd40fae2a04b92b4b1c47139db5b4733fd /src/plugins
parent67df38390fca215c7b7f3e9789227a1305636f22 (diff)
downloadrspamd-e325da73310bc36c61d318f587bbd7655781bd12.tar.gz
rspamd-e325da73310bc36c61d318f587bbd7655781bd12.zip
[Minor] Couple of minor fixes
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/surbl.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 4a8dc9654..7d93c31e3 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -791,13 +791,17 @@ surbl_module_config (struct rspamd_config *cfg)
gint nrules = 0;
lua_State *L;
+ if (!rspamd_config_is_module_enabled (cfg, "surbl")) {
+ return TRUE;
+ }
+
/* Register global methods */
L = cfg->lua_state;
lua_getglobal (L, "rspamd_plugins");
if (lua_type (L, -1) == LUA_TTABLE) {
lua_pushstring (L, "surbl");
- lua_createtable (L, 0, 2);
+ lua_createtable (L, 0, 3);
/* Set methods */
lua_pushstring (L, "register_redirect");
lua_pushcfunction (L, surbl_register_redirect_handler);
@@ -808,16 +812,12 @@ surbl_module_config (struct rspamd_config *cfg)
lua_pushstring (L, "is_redirector");
lua_pushcfunction (L, surbl_is_redirector_handler);
lua_settable (L, -3);
- /* Finish fuzzy_check key */
+ /* Finish surbl key */
lua_settable (L, -3);
}
lua_pop (L, 1); /* Remove global function */
- if (!rspamd_config_is_module_enabled (cfg, "surbl")) {
- return TRUE;
- }
-
(void)rspamd_symbols_cache_add_symbol (cfg->cache, SURBL_REDIRECTOR_CALLBACK,
0, surbl_test_redirector, NULL,
SYMBOL_TYPE_CALLBACK, -1);