diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-11-24 20:11:27 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2011-11-24 20:11:27 +0300 |
commit | 993872bac9e7d3231824f90035c50a1a9b5aff4e (patch) | |
tree | 6681b4338589dbcbb63307b33a3e4ef2291e6c32 /src/kvstorage.h | |
parent | 5caf2897f55f821386f4b9196a7ba73df209321d (diff) | |
download | rspamd-993872bac9e7d3231824f90035c50a1a9b5aff4e.tar.gz rspamd-993872bac9e7d3231824f90035c50a1a9b5aff4e.zip |
Another fix to locking logic.
Diffstat (limited to 'src/kvstorage.h')
-rw-r--r-- | src/kvstorage.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kvstorage.h b/src/kvstorage.h index f970a7086..b99050583 100644 --- a/src/kvstorage.h +++ b/src/kvstorage.h @@ -65,7 +65,8 @@ enum rspamd_kv_flags { KV_ELT_DIRTY = 1 << 2, KV_ELT_OUSTED = 1 << 3, KV_ELT_NEED_FREE = 1 << 4, - KV_ELT_INTEGER = 1 << 5 + KV_ELT_INTEGER = 1 << 5, + KV_ELT_NEED_INSERT = 1 << 6 }; #define ELT_DATA(elt) (gchar *)(elt)->data + (elt)->keylen + 1 @@ -140,6 +141,10 @@ struct rspamd_kv_storage *rspamd_kv_storage_new (gint id, const gchar *name, /** Insert new element to the kv storage */ gboolean rspamd_kv_storage_insert (struct rspamd_kv_storage *storage, gpointer key, guint keylen, gpointer data, gsize len, gint flags, guint expire); +/** Insert element only in cache */ +gboolean rspamd_kv_storage_insert_cache (struct rspamd_kv_storage *storage, gpointer key, guint keylen, + gpointer data, gsize len, gint flags, guint expire, struct rspamd_kv_element **pelt); + /** Replace an element in the kv storage */ gboolean rspamd_kv_storage_replace (struct rspamd_kv_storage *storage, gpointer key, guint keylen, struct rspamd_kv_element *elt); |