aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/cfg_file.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-18 15:42:43 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-18 15:42:43 +0000
commit8920c4d8faf24ab5eff34f389d01da7635514fb0 (patch)
tree9890a600debe14de4cf59ce531a8d6dd5690f76b /src/libserver/cfg_file.h
parent96ae0fe1867bc3c9ba5ea752bd93bd1b3632fa79 (diff)
downloadrspamd-8920c4d8faf24ab5eff34f389d01da7635514fb0.tar.gz
rspamd-8920c4d8faf24ab5eff34f389d01da7635514fb0.zip
[Fix] Rework groups scores definitions
Diffstat (limited to 'src/libserver/cfg_file.h')
-rw-r--r--src/libserver/cfg_file.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h
index c7475c327..c102ef570 100644
--- a/src/libserver/cfg_file.h
+++ b/src/libserver/cfg_file.h
@@ -98,6 +98,13 @@ enum lua_var_type {
LUA_VAR_UNKNOWN
};
+enum rspamd_symbol_group_flags {
+ RSPAMD_SYMBOL_GROUP_NORMAL = 0,
+ RSPAMD_SYMBOL_GROUP_DISABLED = (1 << 0),
+ RSPAMD_SYMBOL_GROUP_ONE_SHOT = (1 << 1),
+ RSPAMD_SYMBOL_GROUP_UNGROUPED = (1 << 2),
+};
+
/**
* Symbols group
*/
@@ -106,13 +113,15 @@ struct rspamd_symbols_group {
gchar *name;
GHashTable *symbols;
gdouble max_score;
- gboolean disabled;
- gboolean one_shot;
+ enum rspamd_symbol_group_flags flags;
};
-#define RSPAMD_SYMBOL_FLAG_IGNORE (1 << 1)
-#define RSPAMD_SYMBOL_FLAG_ONEPARAM (1 << 2)
-#define RSPAMD_SYMBOL_FLAG_UNGROUPPED (1 << 3)
+enum rspamd_symbol_flags {
+ RSPAMD_SYMBOL_FLAG_NORMAL = 0,
+ RSPAMD_SYMBOL_FLAG_IGNORE = (1 << 1),
+ RSPAMD_SYMBOL_FLAG_ONEPARAM = (1 << 2),
+ RSPAMD_SYMBOL_FLAG_UNGROUPPED = (1 << 3),
+};
/**
* Symbol config definition
@@ -125,7 +134,7 @@ struct rspamd_symbol {
guint priority;
struct rspamd_symbols_group *gr; /* Main group */
GPtrArray *groups; /* Other groups */
- guint flags;
+ enum rspamd_symbol_flags flags;
gint nshots;
};