summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorcebka@mailsupport.rambler.ru <cebka@mailsupport.rambler.ru>2008-09-23 18:12:36 +0400
committercebka@mailsupport.rambler.ru <cebka@mailsupport.rambler.ru>2008-09-23 18:12:36 +0400
commitffe2b54bd024bb45fe7ee182d452ad61283df8ca (patch)
treed63a7589dfea70ac173dc44bd2b1c88303afa024 /main.c
parent193acf73e51b24ccca8048ebb6aaec2971594268 (diff)
downloadrspamd-ffe2b54bd024bb45fe7ee182d452ad61283df8ca.tar.gz
rspamd-ffe2b54bd024bb45fe7ee182d452ad61283df8ca.zip
* Rework logic of filters
* Add some documentation to rspamd (about new filters logic and about protocol)
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/main.c b/main.c
index 0478599ce..c67ce419f 100644
--- a/main.c
+++ b/main.c
@@ -152,7 +152,7 @@ int
main (int argc, char **argv)
{
struct rspamd_main *rspamd;
- struct c_module *cur_module = NULL;
+ struct module_ctx *cur_module = NULL;
int res = 0, i, listen_sock;
struct sigaction signals;
struct rspamd_worker *cur, *cur_tmp, *active_worker;
@@ -227,10 +227,9 @@ main (int argc, char **argv)
/* Init C modules */
for (i = 0; i < MODULES_NUM; i ++) {
- cur_module = g_malloc (sizeof (struct c_module));
- cur_module->name = modules[i].name;
- if (modules[i].module_init_func(cfg, &cur_module->ctx) == 0) {
- LIST_INSERT_HEAD (&cfg->c_modules, cur_module, next);
+ cur_module = g_malloc (sizeof (struct module_ctx));
+ if (modules[i].module_init_func(cfg, &cur_module) == 0) {
+ g_hash_table_insert (cfg->c_modules, (gpointer)modules[i].name, cur_module);
}
}