diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-20 22:43:18 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-01-20 22:43:18 +0000 |
commit | 0762a7107fbd1f5b6f1fd39681590acba4993506 (patch) | |
tree | 15333fac31b7cd2f4177dcb4914159ffb456f4d4 /src/libserver | |
parent | a3ecf06dbe6728c9f384fdc864b52f5910acd283 (diff) | |
download | rspamd-0762a7107fbd1f5b6f1fd39681590acba4993506.tar.gz rspamd-0762a7107fbd1f5b6f1fd39681590acba4993506.zip |
Add backend option for statfiles, remove legacy
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/cfg_file.h | 4 | ||||
-rw-r--r-- | src/libserver/cfg_rcl.c | 15 | ||||
-rw-r--r-- | src/libserver/cfg_utils.c | 3 |
3 files changed, 7 insertions, 15 deletions
diff --git a/src/libserver/cfg_file.h b/src/libserver/cfg_file.h index 1beb51055..7338b9068 100644 --- a/src/libserver/cfg_file.h +++ b/src/libserver/cfg_file.h @@ -137,6 +137,8 @@ struct rspamd_statfile_config { gchar *label; /**< label of this statfile */ ucl_object_t *opts; /**< other options */ gboolean is_spam; /**< spam flag */ + const gchar *backend; /**< name of statfile's backend */ + gpointer data; /**< opaque data */ }; /** @@ -216,8 +218,6 @@ struct rspamd_config { gboolean log_color; /**< output colors for console output */ gboolean log_extended; /**< log extended information */ - guint32 statfile_sync_interval; /**< synchronization interval */ - guint32 statfile_sync_timeout; /**< synchronization timeout */ gboolean mlock_statfile_pool; /**< use mlock (2) for locking statfiles */ gboolean delivery_enable; /**< is delivery agent is enabled */ diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index 921464219..c512217e0 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -1276,16 +1276,6 @@ rspamd_rcl_config_init (void) G_STRUCT_OFFSET (struct rspamd_config, filters_str), 0); rspamd_rcl_add_default_handler (sub, - "sync_interval", - rspamd_rcl_parse_struct_time, - G_STRUCT_OFFSET (struct rspamd_config, statfile_sync_interval), - RSPAMD_CL_FLAG_TIME_INTEGER); - rspamd_rcl_add_default_handler (sub, - "sync_timeout", - rspamd_rcl_parse_struct_time, - G_STRUCT_OFFSET (struct rspamd_config, statfile_sync_timeout), - RSPAMD_CL_FLAG_TIME_INTEGER); - rspamd_rcl_add_default_handler (sub, "max_diff", rspamd_rcl_parse_struct_integer, G_STRUCT_OFFSET (struct rspamd_config, max_diff), @@ -1399,6 +1389,11 @@ rspamd_rcl_config_init (void) rspamd_rcl_parse_struct_boolean, G_STRUCT_OFFSET (struct rspamd_statfile_config, is_spam), 0); + rspamd_rcl_add_default_handler (ssub, + "backend", + rspamd_rcl_parse_struct_string, + G_STRUCT_OFFSET (struct rspamd_statfile_config, backend), + 0); /** * Composites handler diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index c9a9555b1..3a0186c89 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -148,9 +148,6 @@ rspamd_config_defaults (struct rspamd_config *cfg) /* 16 sockets per DNS server */ cfg->dns_io_per_server = 16; - cfg->statfile_sync_interval = 60000; - cfg->statfile_sync_timeout = 20000; - /* 20 Kb */ cfg->max_diff = 20480; |