diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-08 19:13:58 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-06-08 19:13:58 +0100 |
commit | e825c3d0d96836c341aeb252c95cf11bb7eab67b (patch) | |
tree | ac2efb0be8536a47169f26435cdaad5691f81d91 /src/libserver | |
parent | 985bc3a2047f990624ce09aa7967618965d2c52e (diff) | |
download | rspamd-e825c3d0d96836c341aeb252c95cf11bb7eab67b.tar.gz rspamd-e825c3d0d96836c341aeb252c95cf11bb7eab67b.zip |
[Minor] Allow to get mempool from a session
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/milter.c | 8 | ||||
-rw-r--r-- | src/libserver/milter.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 94dcbfc8c..36423335e 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -1489,4 +1489,12 @@ rspamd_milter_init_library (const gchar *spam_header) milter_ctx = g_malloc (sizeof (*milter_ctx)); milter_ctx->spam_header = g_strdup (spam_header); +} + +rspamd_mempool_t * +rspamd_milter_get_session_pool (struct rspamd_milter_session *session) +{ + struct rspamd_milter_private *priv = session->priv; + + return priv->pool; }
\ No newline at end of file diff --git a/src/libserver/milter.h b/src/libserver/milter.h index 93195632f..9eb8c3b25 100644 --- a/src/libserver/milter.h +++ b/src/libserver/milter.h @@ -149,4 +149,12 @@ void rspamd_milter_send_task_results (struct rspamd_milter_session *session, */ void rspamd_milter_init_library (const gchar *spam_header); +/** + * Returns pool for a session + * @param session + * @return + */ +rspamd_mempool_t *rspamd_milter_get_session_pool ( + struct rspamd_milter_session *session); + #endif |