aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/map.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-14 17:21:31 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-14 17:21:31 +0000
commit3740caa96e5a3d930db98564f59b00a104e499fa (patch)
tree1f3547bd9d2d15d6d218edaf2a882df3bc2d9e30 /src/libutil/map.h
parent2279095eb2ae749eb727eb2f9abd97a266a17ebd (diff)
downloadrspamd-3740caa96e5a3d930db98564f59b00a104e499fa.tar.gz
rspamd-3740caa96e5a3d930db98564f59b00a104e499fa.zip
[Fix] Rework map reading state machine
Diffstat (limited to 'src/libutil/map.h')
-rw-r--r--src/libutil/map.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libutil/map.h b/src/libutil/map.h
index 13def079a..6ceb04e14 100644
--- a/src/libutil/map.h
+++ b/src/libutil/map.h
@@ -19,7 +19,7 @@ struct map_cb_data;
* Callback types
*/
typedef gchar * (*map_cb_t)(rspamd_mempool_t *pool, gchar *chunk, gint len,
- struct map_cb_data *data);
+ struct map_cb_data *data, gboolean final);
typedef void (*map_fin_cb_t)(rspamd_mempool_t *pool, struct map_cb_data *data);
/**
@@ -80,7 +80,8 @@ typedef void (*insert_func) (gpointer st, gconstpointer key,
gchar * rspamd_radix_read (rspamd_mempool_t *pool,
gchar *chunk,
gint len,
- struct map_cb_data *data);
+ struct map_cb_data *data,
+ gboolean final);
void rspamd_radix_fin (rspamd_mempool_t *pool, struct map_cb_data *data);
/**
@@ -89,7 +90,8 @@ void rspamd_radix_fin (rspamd_mempool_t *pool, struct map_cb_data *data);
gchar * rspamd_hosts_read (rspamd_mempool_t *pool,
gchar *chunk,
gint len,
- struct map_cb_data *data);
+ struct map_cb_data *data,
+ gboolean final);
void rspamd_hosts_fin (rspamd_mempool_t *pool, struct map_cb_data *data);
/**
@@ -98,7 +100,8 @@ void rspamd_hosts_fin (rspamd_mempool_t *pool, struct map_cb_data *data);
gchar * rspamd_kv_list_read (rspamd_mempool_t *pool,
gchar *chunk,
gint len,
- struct map_cb_data *data);
+ struct map_cb_data *data,
+ gboolean final);
void rspamd_kv_list_fin (rspamd_mempool_t *pool, struct map_cb_data *data);
/**
@@ -109,6 +112,7 @@ gchar * rspamd_parse_kv_list (rspamd_mempool_t * pool,
gint len,
struct map_cb_data *data,
insert_func func,
- const gchar *default_value);
+ const gchar *default_value,
+ gboolean final);
#endif