}
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);
* @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,
* 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);
* @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,
* @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
* @param type
*/
void
-register_symbol_common (struct symbols_cache **cache,
+register_symbol_common (struct symbols_cache *cache,
const gchar *name,
double weight,
gint priority,