aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/map_private.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-14 16:05:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-14 16:05:32 +0000
commit2279095eb2ae749eb727eb2f9abd97a266a17ebd (patch)
tree12245289d1daa069dc57339a384e4f21161464df /src/libutil/map_private.h
parente68b100c8894494ed578ad4d5519e08bc6b15299 (diff)
downloadrspamd-2279095eb2ae749eb727eb2f9abd97a266a17ebd.tar.gz
rspamd-2279095eb2ae749eb727eb2f9abd97a266a17ebd.zip
[Fix] Switch to refcounts to avoid more races
Issue: #550 Reported by: @moisseev
Diffstat (limited to 'src/libutil/map_private.h')
-rw-r--r--src/libutil/map_private.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libutil/map_private.h b/src/libutil/map_private.h
index 10f94c3ea..85e468e4e 100644
--- a/src/libutil/map_private.h
+++ b/src/libutil/map_private.h
@@ -20,6 +20,7 @@
#include "mem_pool.h"
#include "keypair.h"
#include "unix-std.h"
+#include "ref.h"
enum fetch_proto {
MAP_PROTO_FILE,
@@ -77,6 +78,7 @@ struct http_callback_data {
struct http_map_data *data;
struct map_cb_data cbdata;
struct rspamd_cryptobox_pubkey *pk;
+ gchar *tmpfile;
enum {
map_resolve_host2 = 0, /* 2 requests sent */
@@ -86,8 +88,9 @@ struct http_callback_data {
map_load_signature
} stage;
gint out_fd;
- gchar *tmpfile;
gint fd;
+
+ ref_entry_t ref;
};
#endif /* SRC_LIBUTIL_MAP_PRIVATE_H_ */