diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-12 16:57:55 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-05-12 16:57:55 +0100 |
commit | a08844879949bcc30cba8e84102f1a6674b38a43 (patch) | |
tree | 304846f0c5ed5256f564391ae478ecd738254df0 /src/plugins/spf.c | |
parent | 8a1eb9cf212ca97822c86d48bc3f9735815dd320 (diff) | |
download | rspamd-a08844879949bcc30cba8e84102f1a6674b38a43.tar.gz rspamd-a08844879949bcc30cba8e84102f1a6674b38a43.zip |
[Minor] Move more magic constants to defines
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r-- | src/plugins/spf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c index c9bc5d67d..275f937ce 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -26,12 +26,14 @@ * - whitelist (map): map of whitelisted networks */ + #include "config.h" #include "libmime/message.h" #include "libserver/spf.h" #include "libutil/hash.h" #include "libutil/map.h" #include "rspamd.h" +#include "libserver/mempool_vars_internal.h" #define DEFAULT_SYMBOL_FAIL "R_SPF_FAIL" #define DEFAULT_SYMBOL_SOFTFAIL "R_SPF_SOFTFAIL" @@ -552,7 +554,8 @@ spf_symbol_callback (struct rspamd_task *task, void *unused) gint *dmarc_checks; /* Allow dmarc */ - dmarc_checks = rspamd_mempool_get_variable (task->task_pool, "dmarc_checks"); + dmarc_checks = rspamd_mempool_get_variable (task->task_pool, + RSPAMD_MEMPOOL_DMARC_CHECKS); if (dmarc_checks) { (*dmarc_checks) ++; @@ -561,7 +564,8 @@ spf_symbol_callback (struct rspamd_task *task, void *unused) dmarc_checks = rspamd_mempool_alloc (task->task_pool, sizeof (*dmarc_checks)); *dmarc_checks = 1; - rspamd_mempool_set_variable (task->task_pool, "dmarc_checks", + rspamd_mempool_set_variable (task->task_pool, + RSPAMD_MEMPOOL_DMARC_CHECKS, dmarc_checks, NULL); } |