diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-28 15:53:06 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-28 15:53:06 +0100 |
commit | fdb511a4ab9810f180fc7ee1853861b803eafb43 (patch) | |
tree | d2d8cb8f53df7e4ed6ac32ee0125a8a381475984 /src/libserver/symbols_cache.h | |
parent | 216c44d0bc3b23ce4cdee9eda4131c8aff1b0494 (diff) | |
download | rspamd-fdb511a4ab9810f180fc7ee1853861b803eafb43.tar.gz rspamd-fdb511a4ab9810f180fc7ee1853861b803eafb43.zip |
Allow delayed conditions registration.
Diffstat (limited to 'src/libserver/symbols_cache.h')
-rw-r--r-- | src/libserver/symbols_cache.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/libserver/symbols_cache.h b/src/libserver/symbols_cache.h index 64d1f911f..f6fffcc08 100644 --- a/src/libserver/symbols_cache.h +++ b/src/libserver/symbols_cache.h @@ -90,10 +90,25 @@ gint rspamd_symbols_cache_add_symbol (struct symbols_cache *cache, * @param cbref callback reference (returned by luaL_ref) * @return TRUE if condition has been added */ -gboolean rspamd_symbols_cache_add_condition (struct symbols_cache *cache, gint id, lua_State *L, gint cbref); +gboolean rspamd_symbols_cache_add_condition (struct symbols_cache *cache, + gint id, lua_State *L, gint cbref); + + +/** + * Add delayed condition to the specific symbol in cache. So symbol can be absent + * to the moment of addition + * @param cache + * @param id id of symbol + * @param L lua state pointer + * @param cbref callback reference (returned by luaL_ref) + * @return TRUE if condition has been added + */ +gboolean rspamd_symbols_cache_add_condition_delayed (struct symbols_cache *cache, + const gchar *sym, lua_State *L, gint cbref); /** - * Find symbol in cache by id and returns its id + * Find symbol in cache by id and returns its id resolving virtual symbols if + * applicable * @param cache * @param name * @return id of symbol or (-1) if a symbol has not been found |