aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-06-07 19:06:09 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-06-07 19:06:09 +0400
commit73ded9877fc31f8c1ff5818b643edb7d7c4ea788 (patch)
tree97a94ceb14fb963a61d414f3d20d44541a533fdb /src/main.c
parenta44b10c0a88a70921f1eec9ced4b3ef0f0e01b4e (diff)
downloadrspamd-73ded9877fc31f8c1ff5818b643edb7d7c4ea788.tar.gz
rspamd-73ded9877fc31f8c1ff5818b643edb7d7c4ea788.zip
Avoid using global 'counters' hash, include it in struct rspamd_main.
Move worker related utils to separate file and include it in rspamd-mime library. Add some cross-dependencies.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index d61e48bac..e13d387fc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -41,8 +41,6 @@
/* 10 seconds after getting termination signal to terminate all workers with SIGKILL */
#define HARD_TERMINATION_TIME 10
-extern rspamd_hash_t *counters;
-
static struct rspamd_worker *fork_worker (struct rspamd_main *, struct worker_conf *);
static gboolean load_rspamd_config (struct config_file *cfg, gboolean init_modules);
static void init_cfg_cache (struct config_file *cfg);
@@ -921,7 +919,7 @@ main (gint argc, gchar **argv, gchar **env)
}
/* Init counters */
- counters = rspamd_hash_new_shared (rspamd_main->server_pool, g_str_hash, g_str_equal, 64);
+ rspamd_main->counters = rspamd_hash_new_shared (rspamd_main->server_pool, g_str_hash, g_str_equal, 64);
/* Init listen sockets hash */
listen_sockets = g_hash_table_new (g_direct_hash, g_direct_equal);