diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-18 14:08:02 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-18 14:08:02 +0100 |
commit | b2ff8ab2a86d0671dcdf591449e7b306ec6e3c36 (patch) | |
tree | 921a9daa6300b9a6deec6a78aca54a7b6f858a9b /src/libutil/map_private.h | |
parent | ff1c29c56832cf18e719a84c1ce44e557a81f669 (diff) | |
download | rspamd-b2ff8ab2a86d0671dcdf591449e7b306ec6e3c36.tar.gz rspamd-b2ff8ab2a86d0671dcdf591449e7b306ec6e3c36.zip |
[Fix] HTTP map hash is per-backend and not per-map
Diffstat (limited to 'src/libutil/map_private.h')
-rw-r--r-- | src/libutil/map_private.h | 43 |
1 files changed, 23 insertions, 20 deletions
diff --git a/src/libutil/map_private.h b/src/libutil/map_private.h index 806a77125..7e0390a6c 100644 --- a/src/libutil/map_private.h +++ b/src/libutil/map_private.h @@ -57,10 +57,33 @@ struct file_map_data { struct stat st; }; + +struct http_map_data; + +struct rspamd_http_map_cached_cbdata { + struct event timeout; + struct rspamd_storage_shmem *shm; + struct rspamd_map *map; + struct http_map_data *data; + guint64 gen; + time_t last_checked; +}; + +struct rspamd_map_cachepoint { + gint available; + gsize len; + time_t last_modified; + gchar shmem_name[256]; +}; + /** * Data specific to HTTP maps */ struct http_map_data { + /* Shared cache data */ + struct rspamd_map_cachepoint *cache; + /* Non-shared for cache owner, used to cleanup cache */ + struct rspamd_http_map_cached_cbdata *cur_cache_cbd; gchar *path; gchar *host; gchar *last_signature; @@ -96,22 +119,6 @@ struct rspamd_map_backend { ref_entry_t ref; }; -struct rspamd_http_map_cached_cbdata { - struct event timeout; - struct rspamd_storage_shmem *shm; - struct rspamd_map *map; - struct http_map_data *data; - guint64 gen; - time_t last_checked; -}; - -struct rspamd_map_cachepoint { - gint available; - gsize len; - time_t last_modified; - gchar shmem_name[256]; -}; - struct rspamd_map { struct rspamd_dns_resolver *r; struct rspamd_config *cfg; @@ -140,10 +147,6 @@ struct rspamd_map { gboolean active_http; /* Shared lock for temporary disabling of map reading (e.g. when this map is written by UI) */ gint *locked; - /* Shared cache data */ - struct rspamd_map_cachepoint *cache; - /* Non-shared for cache owner, used to cleanup cache */ - struct rspamd_http_map_cached_cbdata *cur_cache_cbd; gchar tag[MEMPOOL_UID_LEN]; }; |