From: Vsevolod Stakhov Date: Thu, 29 Oct 2009 16:45:35 +0000 (+0300) Subject: * Fix an issue with workers spawning X-Git-Tag: 0.3.0~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1290cafef2180e5435cbbfd5a72527d0be2f4970;p=thirdparty%2Frspamd.git * Fix an issue with workers spawning * Fix an issue with initializing radix lists in views --- diff --git a/src/main.c b/src/main.c index e600251b1f..7029444679 100644 --- a/src/main.c +++ b/src/main.c @@ -748,6 +748,7 @@ main (int argc, char **argv, char **env) } g_list_free_1 (l); g_free (cur); + break; } l = g_list_next (l); } @@ -779,7 +780,7 @@ main (int argc, char **argv, char **env) kill (cur->pid, SIGUSR2); cur->is_dying = 1; } - else { + else if (!cur->is_dying) { msg_info ("main: %s process %d has been successfully started", get_process_type (cur->type), cur->pid); } l = g_list_next (l); diff --git a/src/view.c b/src/view.c index f3a273899e..9a191fe800 100644 --- a/src/view.c +++ b/src/view.c @@ -40,8 +40,9 @@ init_view (memory_pool_t * pool) new->pool = pool; new->from_hash = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); new->symbols_hash = g_hash_table_new (rspamd_strcase_hash, rspamd_strcase_equal); + new->ip_tree = radix_tree_create (); + new->client_ip_tree = radix_tree_create (); - memory_pool_add_destructor (new->pool, (pool_destruct_func) g_hash_table_destroy, new->from_hash); memory_pool_add_destructor (new->pool, (pool_destruct_func) g_hash_table_destroy, new->symbols_hash); return new;