]> source.dussan.org Git - rspamd.git/commitdiff
* Fix an issue with workers spawning
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 29 Oct 2009 16:45:35 +0000 (19:45 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Thu, 29 Oct 2009 16:45:35 +0000 (19:45 +0300)
* Fix an issue with initializing radix lists in views

src/main.c
src/view.c

index e600251b1fffd3d010271345d1d6594c6a2728c8..7029444679e49c172264ff2a36966a8df1ff3b16 100644 (file)
@@ -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);
index f3a273899e9648e8fd8080f5697ad66279f329bd..9a191fe80014d116c61eb6cf9817075aecf78d7d 100644 (file)
@@ -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;