summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-10-29 19:45:35 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-10-29 19:45:35 +0300
commit1290cafef2180e5435cbbfd5a72527d0be2f4970 (patch)
treef31058a38ad32d580677b86663c4f9ef96f25efc /src
parent15096c5130088a34af3384cac639ca8807a13f8e (diff)
downloadrspamd-1290cafef2180e5435cbbfd5a72527d0be2f4970.tar.gz
rspamd-1290cafef2180e5435cbbfd5a72527d0be2f4970.zip
* Fix an issue with workers spawning
* Fix an issue with initializing radix lists in views
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
-rw-r--r--src/view.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index e600251b1..702944467 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 f3a273899..9a191fe80 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;