]> source.dussan.org Git - rspamd.git/commitdiff
Add methods to extract internal fields from LRU hash
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 14 Dec 2015 15:38:46 +0000 (15:38 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 14 Dec 2015 15:38:46 +0000 (15:38 +0000)
src/libutil/hash.c
src/libutil/hash.h

index 04f87d7a1d50a2385bea8323531f6e9255509b42..51cc4207cb3a8fce6295d7d0d44d16f04d5d29d0 100644 (file)
@@ -228,6 +228,19 @@ rspamd_lru_hash_destroy (rspamd_lru_hash_t *hash)
        g_slice_free1 (sizeof (rspamd_lru_hash_t), hash);
 }
 
+
+GHashTable *
+rspamd_lru_hash_get_htable (rspamd_lru_hash_t *hash)
+{
+       return hash->tbl;
+}
+
+GQueue *
+rspamd_lru_hash_get_queue (rspamd_lru_hash_t *hash)
+{
+       return hash->exp;
+}
+
 /*
  * vi:ts=4
  */
index 022548f3c378ff8e6258632c31769b7c56d0a364..bb55f2595251a8491fa0474b562176b6801a51dc 100644 (file)
@@ -71,6 +71,17 @@ void rspamd_lru_hash_insert (rspamd_lru_hash_t *hash,
 
 void rspamd_lru_hash_destroy (rspamd_lru_hash_t *hash);
 
+/**
+ * Get hash table for this lru hash
+ */
+GHashTable *rspamd_lru_hash_get_htable (rspamd_lru_hash_t *hash);
+
+
+/**
+ * Get expire queue for this lru hash
+ */
+GQueue *rspamd_lru_hash_get_queue (rspamd_lru_hash_t *hash);
+
 #endif
 
 /*