diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-20 18:32:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-20 19:43:32 +0100 |
commit | f76b1582238a3ee7f45308f1df4f840c21b946a8 (patch) | |
tree | ade86728e44d37eadd73ac588936b88eda6f69a2 /src/plugins/spf.c | |
parent | 251a7c9d11a676a58f22edb8afd09f20c69bd61f (diff) | |
download | rspamd-f76b1582238a3ee7f45308f1df4f840c21b946a8.tar.gz rspamd-f76b1582238a3ee7f45308f1df4f840c21b946a8.zip |
[Project] Adopt C modules and stuff
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r-- | src/plugins/spf.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c index cb4546f83..1ec30b4ee 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -512,7 +512,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task, gpointer ud) { struct spf_resolved *l; - struct rspamd_async_watcher *w = ud; + struct rspamd_symcache_item *item = (struct rspamd_symcache_item *)ud; struct spf_ctx *spf_module_ctx = spf_get_context (task->cfg); if (record && record->na) { @@ -562,7 +562,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task, spf_record_unref (l); } - rspamd_session_watcher_pop (task->s, w); + rspamd_symcache_item_async_dec_check (task, item); } @@ -573,7 +573,6 @@ spf_symbol_callback (struct rspamd_task *task, { const gchar *domain; struct spf_resolved *l; - struct rspamd_async_watcher *w; gint *dmarc_checks; struct spf_ctx *spf_module_ctx = spf_get_context (task->cfg); @@ -616,9 +615,8 @@ spf_symbol_callback (struct rspamd_task *task, spf_record_unref (l); } else { - w = rspamd_session_get_watcher (task->s); - if (!rspamd_spf_resolve (task, spf_plugin_callback, w)) { + if (!rspamd_spf_resolve (task, spf_plugin_callback, item)) { msg_info_task ("cannot make spf request for [%s]", task->message_id); rspamd_task_insert_result (task, @@ -627,7 +625,7 @@ spf_symbol_callback (struct rspamd_task *task, "(SPF): spf DNS fail"); } else { - rspamd_session_watcher_push (task->s); + rspamd_symcache_item_async_inc (task, item); } } } |