]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Update public API.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 May 2015 17:38:03 +0000 (18:38 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 26 May 2015 17:38:03 +0000 (18:38 +0100)
src/libserver/symbols_cache.c
src/libserver/symbols_cache.h

index 351e2df095e8e204db86e107f0f5153236fa7eac..c5c01e55c5445a58f47dd370fc8efafb1ae1a4c5 100644 (file)
@@ -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);
 
index 4bac3879fe66964495c99a8ffe731f188ea5747d..5a476f414c7cc0a17cde43b0de4c0604dfbbb21d 100644 (file)
@@ -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,27 +100,13 @@ 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,
        symbol_func_t func,
        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
@@ -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,