aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/milter.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-07 19:35:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-06-07 22:13:18 +0100
commit43a7dcf95ad96b7dbf912ab3da2c74fc243f2845 (patch)
tree8cef4ae84820a6efdf8f248372038dc708c598b2 /src/libserver/milter.c
parent0450fb4e79f13e110a9ebec861c3d6fa3b7536f8 (diff)
downloadrspamd-43a7dcf95ad96b7dbf912ab3da2c74fc243f2845.tar.gz
rspamd-43a7dcf95ad96b7dbf912ab3da2c74fc243f2845.zip
[Minor] Allow to initialize milter context globally
Diffstat (limited to 'src/libserver/milter.c')
-rw-r--r--src/libserver/milter.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c
index ceea53cf8..c9a537ab7 100644
--- a/src/libserver/milter.c
+++ b/src/libserver/milter.c
@@ -1478,3 +1478,15 @@ rspamd_milter_send_task_results (struct rspamd_milter_session *session,
break;
}
}
+
+void
+rspamd_milter_init_library (const gchar *spam_header)
+{
+ if (milter_ctx) {
+ g_free (milter_ctx->spam_header);
+ g_free (milter_ctx);
+ }
+
+ milter_ctx = g_malloc (sizeof (*milter_ctx));
+ milter_ctx->spam_header = g_strdup (spam_header);
+} \ No newline at end of file