diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-15 14:21:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-15 14:21:41 +0100 |
commit | f57c6e2c50e05aebbc9020fc9fe58b647b15b9dd (patch) | |
tree | 53f4d90ce06efaabf776586bdd8e038744b33a5f /src/libserver/cfg_file.h | |
parent | 1d2cb297a1cd882e6b0ea75ca5c081f844742c18 (diff) | |
download | rspamd-f57c6e2c50e05aebbc9020fc9fe58b647b15b9dd.tar.gz rspamd-f57c6e2c50e05aebbc9020fc9fe58b647b15b9dd.zip |
[Feature] Allow multiple groups for symbols
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r-- | src/libserver/cfg_file.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 7a6cc1c8a..5a846a1f5 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -123,8 +123,8 @@ struct rspamd_symbol { gdouble *weight_ptr; gdouble score; guint priority; - struct rspamd_symbols_group *gr; - GList *groups; + struct rspamd_symbols_group *gr; /* Main group */ + GPtrArray *groups; /* Other groups */ guint flags; gint nshots; }; @@ -585,10 +585,24 @@ gboolean rspamd_init_filters (struct rspamd_config *cfg, bool reconfig); * @return TRUE if symbol has been inserted or FALSE if symbol already exists with higher priority */ gboolean rspamd_config_add_symbol (struct rspamd_config *cfg, - const gchar *symbol, gdouble score, const gchar *description, - const gchar *group, guint flags, - guint priority, - gint nshots); + const gchar *symbol, + gdouble score, + const gchar *description, + const gchar *group, + guint flags, + guint priority, + gint nshots); + +/** + * Adds new group for a symbol + * @param cfg + * @param symbol + * @param group + * @return + */ +gboolean rspamd_config_add_symbol_group (struct rspamd_config *cfg, + const gchar *symbol, + const gchar *group); /** * Sets action score for a specified metric with the specified priority |