aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-18 23:11:14 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-01-18 23:11:14 +0000
commita100148f8013329580e20697b3a2c078f62446b6 (patch)
tree1bb0ddd8094d6aa2cb210f9169802bd6c21d57b9 /src/main.c
parent80b27bcfc04bbbe1ca3596fe4376ab2fe61a2543 (diff)
downloadrspamd-a100148f8013329580e20697b3a2c078f62446b6.tar.gz
rspamd-a100148f8013329580e20697b3a2c078f62446b6.zip
Remove legacy statfile pool.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/src/main.c b/src/main.c
index 8b76af889..fbbc5c0f0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -495,8 +495,7 @@ fork_worker (struct rspamd_main *rspamd, struct rspamd_worker_conf *cf)
case 0:
/* Update pid for logging */
rspamd_log_update_pid (cf->type, rspamd->logger);
- /* Lock statfile pool if possible */
- statfile_pool_lockall (rspamd->statfile_pool);
+ /* Lock statfile pool if possible XXX */
/* Init PRNG after fork */
ottery_init (NULL);
g_random_set_seed (ottery_rand_uint32 ());
@@ -798,36 +797,6 @@ reopen_log_handler (gpointer key, gpointer value, gpointer unused)
}
}
-static void
-preload_statfiles (struct rspamd_main *rspamd)
-{
- struct rspamd_classifier_config *cf;
- struct rspamd_statfile_config *st;
- stat_file_t *stf;
- GList *cur_cl, *cur_st;
-
- cur_cl = rspamd->cfg->classifiers;
- while (cur_cl) {
- /* Open all statfiles */
- cf = cur_cl->data;
-
- cur_st = cf->statfiles;
- while (cur_st) {
- st = cur_st->data;
- stf = statfile_pool_open (rspamd->statfile_pool,
- st->path,
- st->size,
- FALSE);
- if (stf == NULL) {
- msg_warn ("preload of %s from %s failed", st->symbol, st->path);
- }
- cur_st = g_list_next (cur_st);
- }
-
- cur_cl = g_list_next (cur_cl);
- }
-}
-
static gboolean
load_rspamd_config (struct rspamd_config *cfg, gboolean init_modules)
{
@@ -1351,10 +1320,6 @@ main (gint argc, gchar **argv, gchar **env)
setproctitle ("main process");
- /* Init statfile pool */
- rspamd_main->statfile_pool = statfile_pool_new (rspamd_main->server_pool,
- rspamd_main->cfg->mlock_statfile_pool);
-
/* Init lua filters */
if (!rspamd_init_lua_filters (rspamd_main->cfg)) {
msg_err ("error loading lua plugins");
@@ -1386,9 +1351,6 @@ main (gint argc, gchar **argv, gchar **env)
/* Flush log */
rspamd_log_flush (rspamd_main->logger);
- /* Preload all statfiles */
- preload_statfiles (rspamd_main);
-
/* Maybe read roll history */
if (rspamd_main->cfg->history_file) {
rspamd_roll_history_load (rspamd_main->history,
@@ -1511,8 +1473,6 @@ main (gint argc, gchar **argv, gchar **env)
msg_info ("terminating...");
- statfile_pool_delete (rspamd_main->statfile_pool);
-
rspamd_log_close (rspamd_main->logger);
rspamd_config_free (rspamd_main->cfg);