diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-24 23:02:59 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-10-24 23:02:59 +0100 |
commit | f163ec3b4f55cb0e7c5384ee1bd27561b3e8820e (patch) | |
tree | 3b99cd50d0bd11b7eee0aae3740fe4c44d11e889 /src/libserver | |
parent | efb6bd2dea636280bf95b466ce099c9bd848466c (diff) | |
download | rspamd-f163ec3b4f55cb0e7c5384ee1bd27561b3e8820e.tar.gz rspamd-f163ec3b4f55cb0e7c5384ee1bd27561b3e8820e.zip |
Finish history format rework.
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/cfg_file.h | 1 | ||||
-rw-r--r-- | src/libserver/cfg_rcl.c | 5 | ||||
-rw-r--r-- | src/libserver/cfg_utils.c | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 44b91505d..1fc5aee28 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -271,6 +271,7 @@ struct rspamd_config { gdouble upstream_revive_time; /**< revive timeout for upstreams */ guint32 min_word_len; /**< minimum length of the word to be considered */ + guint history_rows; /**< number of history rows stored */ GList *classify_headers; /**< list of headers using for statistics */ struct module_s **compiled_modules; /**< list of compiled C modules */ diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 596fff74a..7180d8d70 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -1447,6 +1447,11 @@ rspamd_rcl_config_init (void) rspamd_rcl_parse_struct_string, G_STRUCT_OFFSET (struct rspamd_config, tld_file), RSPAMD_CL_FLAG_STRING_PATH); + rspamd_rcl_add_default_handler (sub, + "history_rows", + rspamd_rcl_parse_struct_integer, + G_STRUCT_OFFSET (struct rspamd_config, history_rows), + RSPAMD_CL_FLAG_UINT); /** * Metric section diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 5e3bf1561..3af15ab1d 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -175,6 +175,7 @@ rspamd_config_defaults (struct rspamd_config *cfg) cfg->min_word_len = DEFAULT_MIN_WORD; cfg->dns_max_requests = 64; + cfg->history_rows = 200; } void |