aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-28 12:25:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-05-28 12:25:25 +0100
commit5645cc20de577a60111b42ac15a8c931391307fc (patch)
tree334744bc1bf745e03023f3479d086833c75c2342 /src/plugins/spf.c
parentc84185a3476fcc1177eee00efc7549a90d9a2887 (diff)
downloadrspamd-5645cc20de577a60111b42ac15a8c931391307fc.tar.gz
rspamd-5645cc20de577a60111b42ac15a8c931391307fc.zip
Adopt internal modules.
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r--src/plugins/spf.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 8c477cca9..eab58c1d2 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -93,7 +93,7 @@ gint
spf_module_config (struct rspamd_config *cfg)
{
const ucl_object_t *value;
- gint res = TRUE;
+ gint res = TRUE, cb_id;
guint cache_size, cache_expire;
spf_module_ctx->whitelist_ip = radix_create_compressed ();
@@ -151,14 +151,17 @@ spf_module_config (struct rspamd_config *cfg)
}
}
- rspamd_symbols_cache_add_symbol_normal (cfg->cache,
+ cb_id = rspamd_symbols_cache_add_symbol_normal (cfg->cache,
spf_module_ctx->symbol_fail,
1,
spf_symbol_callback,
NULL);
- rspamd_symbols_cache_add_symbol_virtual (cfg->cache, spf_module_ctx->symbol_softfail, 1);
- rspamd_symbols_cache_add_symbol_virtual (cfg->cache, spf_module_ctx->symbol_neutral, 1);
- rspamd_symbols_cache_add_symbol_virtual (cfg->cache, spf_module_ctx->symbol_allow, 1);
+ rspamd_symbols_cache_add_symbol_virtual (cfg->cache,
+ spf_module_ctx->symbol_softfail, 1, cb_id);
+ rspamd_symbols_cache_add_symbol_virtual (cfg->cache,
+ spf_module_ctx->symbol_neutral, 1, cb_id);
+ rspamd_symbols_cache_add_symbol_virtual (cfg->cache,
+ spf_module_ctx->symbol_allow, 1, cb_id);
spf_module_ctx->spf_hash = rspamd_lru_hash_new (
cache_size,