aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-27 15:33:40 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-27 15:33:40 +0100
commite64c5411ff18eea69861b6ea11574a39c7290b57 (patch)
tree81cdfad068f564a5bb4e64f2ec962bbbfdbc0f7a /src/plugins
parent9b6dc9034592b836915b57749aa42581e78cd9ff (diff)
downloadrspamd-e64c5411ff18eea69861b6ea11574a39c7290b57.tar.gz
rspamd-e64c5411ff18eea69861b6ea11574a39c7290b57.zip
Fix plugins registration.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/chartable.c4
-rw-r--r--src/plugins/dkim_check.c6
-rw-r--r--src/plugins/fuzzy_check.c6
-rw-r--r--src/plugins/regexp.c4
-rw-r--r--src/plugins/spf.c8
-rw-r--r--src/plugins/surbl.c10
6 files changed, 18 insertions, 20 deletions
diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c
index 3efec040b..7c4372a13 100644
--- a/src/plugins/chartable.c
+++ b/src/plugins/chartable.c
@@ -60,8 +60,6 @@ struct chartable_ctx {
};
static struct chartable_ctx *chartable_module_ctx = NULL;
-
-static gint chartable_mime_filter (struct rspamd_task *task);
static void chartable_symbol_callback (struct rspamd_task *task, void *unused);
gint
@@ -102,7 +100,7 @@ chartable_module_config (struct rspamd_config *cfg)
chartable_module_ctx->threshold = DEFAULT_THRESHOLD;
}
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
chartable_module_ctx->symbol,
1,
chartable_symbol_callback,
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index 9e88ab310..7e430f5a6 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -223,15 +223,15 @@ dkim_module_config (struct rspamd_config *cfg)
"trusted_only option is set and no trusted domains are defined; disabling dkim module completely as it is useless in this case");
}
else {
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
dkim_module_ctx->symbol_reject,
1,
dkim_symbol_callback,
NULL);
- register_virtual_symbol (&cfg->cache,
+ register_virtual_symbol (cfg->cache,
dkim_module_ctx->symbol_tempfail,
1);
- register_virtual_symbol (&cfg->cache,
+ register_virtual_symbol (cfg->cache,
dkim_module_ctx->symbol_allow,
1);
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index ebaab2717..c1556fa4d 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -174,7 +174,7 @@ parse_flags (struct fuzzy_rule *rule,
/* Add flag to hash table */
g_hash_table_insert (rule->mappings,
GINT_TO_POINTER (map->fuzzy_flag), map);
- register_virtual_symbol (&cfg->cache, map->symbol, 1.0);
+ register_virtual_symbol (cfg->cache, map->symbol, 1.0);
}
else {
msg_err ("fuzzy_map parameter has no flag definition");
@@ -383,7 +383,7 @@ fuzzy_parse_rule (struct rspamd_config *cfg, const ucl_object_t *obj)
fuzzy_module_ctx->fuzzy_rules,
rule);
if (rule->symbol != fuzzy_module_ctx->default_symbol) {
- register_virtual_symbol (&cfg->cache, rule->symbol, 1.0);
+ register_virtual_symbol (cfg->cache, rule->symbol, 1.0);
}
}
@@ -484,7 +484,7 @@ fuzzy_check_module_config (struct rspamd_config *cfg)
}
if (fuzzy_module_ctx->fuzzy_rules != NULL) {
- register_callback_symbol (&cfg->cache, fuzzy_module_ctx->default_symbol,
+ register_callback_symbol (cfg->cache, fuzzy_module_ctx->default_symbol,
1.0, fuzzy_symbol_callback, NULL);
}
else {
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 8df81a9e6..2a9229b09 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -142,7 +142,7 @@ regexp_module_config (struct rspamd_config *cfg)
res = FALSE;
}
else {
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
cur_item->symbol,
1,
process_regexp_item,
@@ -154,7 +154,7 @@ regexp_module_config (struct rspamd_config *cfg)
sizeof (struct regexp_module_item));
cur_item->symbol = ucl_object_key (value);
cur_item->lua_function = ucl_object_toclosure (value);
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
cur_item->symbol,
1,
process_regexp_item,
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 8e03334fb..f3c8226e4 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -151,14 +151,14 @@ spf_module_config (struct rspamd_config *cfg)
}
}
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
spf_module_ctx->symbol_fail,
1,
spf_symbol_callback,
NULL);
- register_virtual_symbol (&cfg->cache, spf_module_ctx->symbol_softfail, 1);
- register_virtual_symbol (&cfg->cache, spf_module_ctx->symbol_neutral, 1);
- register_virtual_symbol (&cfg->cache, spf_module_ctx->symbol_allow, 1);
+ register_virtual_symbol (cfg->cache, spf_module_ctx->symbol_softfail, 1);
+ register_virtual_symbol (cfg->cache, spf_module_ctx->symbol_neutral, 1);
+ register_virtual_symbol (cfg->cache, spf_module_ctx->symbol_allow, 1);
spf_module_ctx->spf_hash = rspamd_lru_hash_new (
cache_size,
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 39a6e2974..bd87dc944 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -314,18 +314,18 @@ register_bit_symbols (struct rspamd_config *cfg, struct suffix_item *suffix)
while (g_hash_table_iter_next (&it, &k, &v)) {
bit = v;
- register_virtual_symbol (&cfg->cache, bit->symbol, 1);
+ register_virtual_symbol (cfg->cache, bit->symbol, 1);
msg_debug ("bit: %d", bit->bit);
}
}
else if (suffix->bits != NULL) {
for (i = 0; i < suffix->bits->len; i++) {
bit = &g_array_index (suffix->bits, struct surbl_bit_item, i);
- register_virtual_symbol (&cfg->cache, bit->symbol, 1);
+ register_virtual_symbol (cfg->cache, bit->symbol, 1);
}
}
else {
- register_virtual_symbol (&cfg->cache, suffix->symbol, 1);
+ register_virtual_symbol (cfg->cache, suffix->symbol, 1);
}
}
@@ -361,7 +361,7 @@ surbl_module_config (struct rspamd_config *cfg)
rspamd_config_get_module_opt (cfg, "surbl",
"redirector_symbol")) != NULL) {
surbl_module_ctx->redirector_symbol = ucl_obj_tostring (value);
- register_virtual_symbol (&cfg->cache,
+ register_virtual_symbol (cfg->cache,
surbl_module_ctx->redirector_symbol,
1.0);
}
@@ -553,7 +553,7 @@ surbl_module_config (struct rspamd_config *cfg)
surbl_module_ctx->suffixes = g_list_prepend (
surbl_module_ctx->suffixes,
new_suffix);
- register_callback_symbol (&cfg->cache,
+ register_callback_symbol (cfg->cache,
new_suffix->symbol,
1,
surbl_test_url,