diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-26 18:38:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-05-26 18:38:03 +0100 |
commit | 785d41cf80fcfb32d700ef8e0686eeb9647bbeed (patch) | |
tree | 33c8b252d1249a3f54d91dd2100703b753dc51d3 /src | |
parent | b880fdbe3882a6f6a44da385dd0e3b8160ed0fd7 (diff) | |
download | rspamd-785d41cf80fcfb32d700ef8e0686eeb9647bbeed.tar.gz rspamd-785d41cf80fcfb32d700ef8e0686eeb9647bbeed.zip |
Update public API.
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/symbols_cache.c | 2 | ||||
-rw-r--r-- | src/libserver/symbols_cache.h | 24 |
2 files changed, 7 insertions, 19 deletions
diff --git a/src/libserver/symbols_cache.c b/src/libserver/symbols_cache.c index 351e2df09..c5c01e55c 100644 --- a/src/libserver/symbols_cache.c +++ b/src/libserver/symbols_cache.c @@ -429,6 +429,8 @@ register_symbol_common (struct symbols_cache *cache, } g_hash_table_insert (cache->items_by_symbol, item->symbol, item); + item->id = cache->used_items; + cache->used_items ++; msg_debug ("used items: %d, added symbol: %s", cache->used_items, name); rspamd_set_counter (item, 0); diff --git a/src/libserver/symbols_cache.h b/src/libserver/symbols_cache.h index 4bac3879f..5a476f414 100644 --- a/src/libserver/symbols_cache.h +++ b/src/libserver/symbols_cache.h @@ -67,7 +67,7 @@ gboolean init_symbols_cache (struct symbols_cache* cache, * @param func pointer to handler * @param user_data pointer to user_data */ -void register_symbol (struct symbols_cache **cache, +void register_symbol (struct symbols_cache *cache, const gchar *name, double weight, symbol_func_t func, @@ -78,7 +78,7 @@ void register_symbol (struct symbols_cache **cache, * Register virtual symbol * @param name name of symbol */ -void register_virtual_symbol (struct symbols_cache **cache, +void register_virtual_symbol (struct symbols_cache *cache, const gchar *name, double weight); @@ -88,7 +88,7 @@ void register_virtual_symbol (struct symbols_cache **cache, * @param func pointer to handler * @param user_data pointer to user_data */ -void register_callback_symbol (struct symbols_cache **cache, +void register_callback_symbol (struct symbols_cache *cache, const gchar *name, double weight, symbol_func_t func, @@ -100,7 +100,7 @@ void register_callback_symbol (struct symbols_cache **cache, * @param func pointer to handler * @param user_data pointer to user_data */ -void register_callback_symbol_priority (struct symbols_cache **cache, +void register_callback_symbol_priority (struct symbols_cache *cache, const gchar *name, double weight, gint priority, @@ -108,20 +108,6 @@ void register_callback_symbol_priority (struct symbols_cache **cache, gpointer user_data); /** - * Register function for dynamic symbols parsing - * @param name name of symbol - * @param func pointer to handler - * @param user_data pointer to user_data - */ -void register_dynamic_symbol (rspamd_mempool_t *pool, - struct symbols_cache **cache, - const gchar *name, - double weight, - symbol_func_t func, - gpointer user_data, - GList *networks); - -/** * Generic function to register a symbol * @param cache * @param name @@ -132,7 +118,7 @@ void register_dynamic_symbol (rspamd_mempool_t *pool, * @param type */ void -register_symbol_common (struct symbols_cache **cache, +register_symbol_common (struct symbols_cache *cache, const gchar *name, double weight, gint priority, |