diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-14 09:47:05 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-01-14 09:47:05 +0000 |
commit | 96986ba7f75858395a35c87305427b16eca96547 (patch) | |
tree | cb8836a0ffbfee1871bb85ac7bc708b1fea2d511 /src/libserver/cfg_file.h | |
parent | 60107a1f7d79df078c8528618c026858092d2d46 (diff) | |
download | rspamd-96986ba7f75858395a35c87305427b16eca96547.tar.gz rspamd-96986ba7f75858395a35c87305427b16eca96547.zip |
[Project] More steps to flexible actions
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r-- | src/libserver/cfg_file.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 22b154943..3a8094585 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -29,7 +29,6 @@ #include "libutil/radix.h" #include "monitored.h" #include "redis_pool.h" -#include "contrib/uthash/uthash.h" #define DEFAULT_BIND_PORT 11333 #define DEFAULT_CONTROL_PORT 11334 @@ -280,6 +279,7 @@ enum rspamd_action_flags { RSPAMD_ACTION_HAM = (1u << 2), }; +struct UT_hash_handle; /** * Action config definition */ @@ -290,7 +290,7 @@ struct rspamd_action { gint lua_handler_ref; /* If special handling is needed */ gdouble threshold; gchar *name; - UT_hash_handle hh; /* Index by name */ + struct UT_hash_handle hh; /* Index by name */ }; struct rspamd_config_post_load_script { @@ -699,6 +699,15 @@ gboolean rspamd_config_radix_from_ucl (struct rspamd_config *cfg, struct rspamd_radix_map_helper **target, GError **err); +/** + * Returns action object by name + * @param cfg + * @param name + * @return + */ +struct rspamd_action * rspamd_config_get_action (struct rspamd_config *cfg, + const gchar *name); + #define msg_err_config(...) rspamd_default_log_function (G_LOG_LEVEL_CRITICAL, \ cfg->cfg_pool->tag.tagname, cfg->checksum, \ G_STRFUNC, \ |