aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/milter_internal.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-23 16:12:36 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-08-23 16:31:52 +0100
commit233c911bdf5ee87abbe9955eb1b9dc20aab93c7b (patch)
treef73e812672d7b427c29227916e1ba361fb9f6220 /src/libserver/milter_internal.h
parente94ceeaf832692de3f3f212701c7a6dd74cd98d6 (diff)
downloadrspamd-233c911bdf5ee87abbe9955eb1b9dc20aab93c7b.tar.gz
rspamd-233c911bdf5ee87abbe9955eb1b9dc20aab93c7b.zip
[Minor] Store full order of headers in milter mode
Diffstat (limited to 'src/libserver/milter_internal.h')
-rw-r--r--src/libserver/milter_internal.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libserver/milter_internal.h b/src/libserver/milter_internal.h
index f44da9c93..1e4b7b187 100644
--- a/src/libserver/milter_internal.h
+++ b/src/libserver/milter_internal.h
@@ -20,6 +20,8 @@
#include "config.h"
#include "libutil/mem_pool.h"
#include <event.h>
+#include "khash.h"
+#include "libutil/str_util.h"
enum rspamd_milter_state {
st_len_1 = 0,
@@ -52,6 +54,9 @@ enum rspamd_milter_io_state {
RSPAMD_MILTER_WRITE_AND_DIE,
};
+KHASH_INIT (milter_headers_hash_t, char *, GArray *, true,
+ rspamd_strcase_hash, rspamd_strcase_equal);
+
struct rspamd_milter_private {
struct rspamd_milter_parser parser;
struct event ev;
@@ -60,7 +65,8 @@ struct rspamd_milter_private {
struct timeval *ptv;
struct event_base *ev_base;
rspamd_mempool_t *pool;
- GHashTable *headers;
+ khash_t(milter_headers_hash_t) *headers;
+ gint cur_hdr;
rspamd_milter_finish fin_cb;
rspamd_milter_error err_cb;
void *ud;