aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-13 20:54:13 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-07-13 20:54:13 +0400
commita8cdd33ac7ee59e195dca03a395c264877ee5168 (patch)
tree077413b678005aad4f66dbeae82a982cb71ce75f /src/main.c
parent74b38eb87d0ee6e401e06d8c604d55be2d93a1b2 (diff)
downloadrspamd-a8cdd33ac7ee59e195dca03a395c264877ee5168.tar.gz
rspamd-a8cdd33ac7ee59e195dca03a395c264877ee5168.zip
* Rework the whole filters system
* Add metrics optimization and symbols cache * Change all plugins [DRAGONS]: not for production usage, some things are still not working!
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index dc0226680..beefabdcb 100644
--- a/src/main.c
+++ b/src/main.c
@@ -435,8 +435,10 @@ main (int argc, char **argv, char **env)
struct sigaction signals;
struct rspamd_worker *cur, *cur_tmp, *active_worker;
struct rlimit rlim;
+ struct metric *metric;
FILE *f;
pid_t wrk;
+ GList *l;
#ifndef WITHOUT_PERL
char *args[] = { "", "-e", "0", NULL };
#endif
@@ -609,6 +611,14 @@ main (int argc, char **argv, char **env)
for (i = 0; i < MODULES_NUM; i ++) {
modules[i].module_config_func (cfg);
}
+
+ /* Init symbols cache for each metric */
+ l = g_list_first (cfg->metrics_list);
+ while (l) {
+ metric = l->data;
+ init_symbols_cache (cfg->cfg_pool, metric->cache, metric->cache_filename);
+ l = g_list_next (l);
+ }
spawn_workers (rspamd);