diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-27 20:05:33 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-07-27 20:05:33 +0400 |
commit | 7ed8ac7bcb54df908bd4a5f8b915ec1fdc483ac7 (patch) | |
tree | 8cb06875ef55407d7961d11491346b2899971f18 /src/main.c | |
parent | bc7022c5ce4186892ac4d9eee5899fdbc65e62c4 (diff) | |
download | rspamd-7ed8ac7bcb54df908bd4a5f8b915ec1fdc483ac7.tar.gz rspamd-7ed8ac7bcb54df908bd4a5f8b915ec1fdc483ac7.zip |
* Implement fuzzy hashes storage worker
TODO:
- implement client as rspamd plugin
- add support to controller and rspamc
- improve performance by avoiding usage of linked lists
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 00cf68203..40c4c68f8 100644 --- a/src/main.c +++ b/src/main.c @@ -27,6 +27,7 @@ #include "cfg_file.h" #include "util.h" #include "lmtp.h" +#include "fuzzy_storage.h" #ifndef WITHOUT_PERL @@ -302,6 +303,13 @@ fork_worker (struct rspamd_main *rspamd, struct worker_conf *cf) pidfile_close (rspamd->pfh); msg_info ("fork_worker: starting lmtp process %d", getpid ()); start_lmtp_worker (cur); + break; + case TYPE_FUZZY: + setproctitle ("fuzzy storage"); + pidfile_close (rspamd->pfh); + msg_info ("fork_worker: starting fuzzy storage process %d", getpid ()); + start_fuzzy_storage (cur); + break; case TYPE_WORKER: default: setproctitle ("worker process"); @@ -731,7 +739,7 @@ main (int argc, char **argv, char **env) if (active_worker == NULL) { /* reread_config (rspamd); */ TAILQ_FOREACH_SAFE (cur, &rspamd->workers, next, cur_tmp) { - if (cur->type == TYPE_WORKER || cur->type == TYPE_LMTP) { + if (cur->type == TYPE_WORKER || cur->type == TYPE_LMTP || cur->type == TYPE_FUZZY) { /* Start new workers that would reread configuration */ active_worker = fork_worker (rspamd, cur->cf); } |