summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-18 16:27:25 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-06-22 10:57:29 +0100
commitd5a36f4f750e63294cefed10f55b29fe7409bba6 (patch)
tree0cebfb90d8a004a6e5d261077f72be05a32101a7 /src/plugins
parent4b75d23d067118e2874ec3b8726d49e3f185b811 (diff)
downloadrspamd-d5a36f4f750e63294cefed10f55b29fe7409bba6.tar.gz
rspamd-d5a36f4f750e63294cefed10f55b29fe7409bba6.zip
[Project] Another iteration
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dkim_check.c10
-rw-r--r--src/plugins/spf.c6
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index e1cdc5e98..233ecf1d1 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -1056,8 +1056,8 @@ dkim_module_key_handler (rspamd_dkim_key_t *key,
* lru hash owns this object now
*/
rspamd_lru_hash_insert (dkim_module_ctx->dkim_hash,
- g_strdup (rspamd_dkim_get_dns_key (ctx)),
- key, res->task->tv.tv_sec, rspamd_dkim_key_get_ttl (key));
+ g_strdup (rspamd_dkim_get_dns_key (ctx)),
+ key, res->task->task_timestamp, rspamd_dkim_key_get_ttl (key));
/* Release key when task is processed */
rspamd_mempool_add_destructor (res->task->task_pool,
dkim_module_key_dtor, res->key);
@@ -1210,7 +1210,7 @@ dkim_symbol_callback (struct rspamd_task *task,
key = rspamd_lru_hash_lookup (dkim_module_ctx->dkim_hash,
rspamd_dkim_get_dns_key (ctx),
- task->tv.tv_sec);
+ task->task_timestamp);
if (key != NULL) {
cur->key = rspamd_dkim_key_ref (key);
@@ -1400,7 +1400,7 @@ dkim_module_lua_on_key (rspamd_dkim_key_t *key,
*/
rspamd_lru_hash_insert (dkim_module_ctx->dkim_hash,
g_strdup (rspamd_dkim_get_dns_key (ctx)),
- key, cbd->task->tv.tv_sec, rspamd_dkim_key_get_ttl (key));
+ key, cbd->task->task_timestamp, rspamd_dkim_key_get_ttl (key));
/* Release key when task is processed */
rspamd_mempool_add_destructor (cbd->task->task_pool,
dkim_module_key_dtor, cbd->key);
@@ -1507,7 +1507,7 @@ lua_dkim_verify_handler (lua_State *L)
key = rspamd_lru_hash_lookup (dkim_module_ctx->dkim_hash,
rspamd_dkim_get_dns_key (ctx),
- task->tv.tv_sec);
+ task->task_timestamp);
if (key != NULL) {
cbd->key = rspamd_dkim_key_ref (key);
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 6a4004e57..f10807f47 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -561,7 +561,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task,
spf_record_ref (record);
if ((l = rspamd_lru_hash_lookup (spf_module_ctx->spf_hash,
- record->domain, task->tv.tv_sec)) == NULL) {
+ record->domain, task->task_timestamp)) == NULL) {
l = record;
if (record->ttl > 0 &&
@@ -571,7 +571,7 @@ spf_plugin_callback (struct spf_resolved *record, struct rspamd_task *task,
rspamd_lru_hash_insert (spf_module_ctx->spf_hash,
record->domain, spf_record_ref (l),
- task->tv.tv_sec, record->ttl);
+ task->task_timestamp, record->ttl);
msg_info_task ("stored record for %s (0x%xuL) in LRU cache for %d seconds, "
"%d/%d elements in the cache",
@@ -642,7 +642,7 @@ spf_symbol_callback (struct rspamd_task *task,
if (domain) {
if ((l =
rspamd_lru_hash_lookup (spf_module_ctx->spf_hash, domain,
- task->tv.tv_sec)) != NULL) {
+ task->task_timestamp)) != NULL) {
spf_record_ref (l);
spf_check_list (l, task, TRUE);
spf_record_unref (l);