From bca226772e9747a4587866a50122d4a8f7973b26 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 17 Jun 2009 19:31:48 +0400 Subject: * Introduce new system of workers spawning and configuring, now rspamd can be easily extended by new types of wrokers * Rework config system and avoid from using queue (3) lists * Upgrade version to 0.2.0 as config format is now incompatible with older one --- src/main.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index c356823b8..c653964b7 100644 --- a/src/main.h +++ b/src/main.h @@ -38,6 +38,7 @@ #endif #define CRLF "\r\n" + /** * Process type: main or worker */ @@ -46,6 +47,7 @@ enum process_type { TYPE_WORKER, TYPE_CONTROLLER, TYPE_LMTP, + TYPE_FUZZY, }; /** @@ -70,6 +72,7 @@ struct rspamd_worker { enum process_type type; /**< process type */ struct event sig_ev; /**< signals event */ struct event bind_ev; /**< socket events */ + struct worker_conf *cf; /**< worker config data */ TAILQ_ENTRY (rspamd_worker) next; /**< chain link to next worker */ }; @@ -118,8 +121,8 @@ struct counter_data { * Save point object for delayed filters processing */ struct save_point { - void *entry; /**< pointer to C function or perl function name */ - enum script_type type; /**< where we did stop */ + GList *entry; /**< pointer to saved filter */ + enum script_type type; unsigned int saved; /**< how much time we have delayed processing */ }; @@ -216,7 +219,7 @@ struct c_module { LIST_ENTRY (c_module) next; /**< linked list */ }; -void start_worker (struct rspamd_worker *worker, int listen_sock); +void start_worker (struct rspamd_worker *worker); void start_controller (struct rspamd_worker *worker); /** -- cgit v1.2.3