diff options
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/main.h b/src/main.h index ada9d97e4..63a94b462 100644 --- a/src/main.h +++ b/src/main.h @@ -49,7 +49,7 @@ struct rspamd_worker { gboolean is_dying; /**< if worker is going to shutdown */ gboolean pending; /**< if worker is pending to run */ struct rspamd_main *srv; /**< pointer to server structure */ - enum process_type type; /**< process type */ + GQuark type; /**< process type */ struct event sig_ev_usr1; /**< signals event */ struct event sig_ev_usr2; /**< signals event */ struct event bind_ev; /**< socket events */ @@ -57,6 +57,10 @@ struct rspamd_worker { gpointer ctx; /**< worker's specific data */ }; +/** + * Module + */ + struct pidfh; struct config_file; struct tokenizer; @@ -88,8 +92,8 @@ struct rspamd_main { struct config_file *cfg; /**< pointer to config structure */ pid_t pid; /**< main pid */ /* Pid file structure */ - rspamd_pidfh_t *pfh; /**< struct pidfh for pidfile */ - enum process_type type; /**< process type */ + rspamd_pidfh_t *pfh; /**< struct pidfh for pidfile */ + GQuark type; /**< process type */ guint ev_initialized; /**< is event system is initialized */ struct rspamd_stat *stat; /**< pointer to statistics */ @@ -262,23 +266,12 @@ struct c_module { struct module_ctx *ctx; /**< pointer to context */ }; -/* Workers' initialization and start functions */ -gpointer init_worker (void); -void start_worker (struct rspamd_worker *worker); -gpointer init_controller (void); -void start_controller (struct rspamd_worker *worker); - /** * Register custom controller function */ void register_custom_controller_command (const gchar *name, controller_func_t handler, gboolean privilleged, gboolean require_message); /** - * Initialize context for worker of specified type - */ -gpointer init_workers_ctx (enum process_type type); - -/** * If set, reopen log file on next write */ extern struct rspamd_main *rspamd_main; |