diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-02 19:37:06 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-11-02 19:37:06 +0300 |
commit | d78ac2d1060c2b049b4eebc176d3823f82f9ea76 (patch) | |
tree | 452789270aaf0fc3bc6aee865b444dd43d37f1be /src/main.c | |
parent | bd0ade804fff8e999b9fadd88452d1d5b5ba1ccb (diff) | |
download | rspamd-d78ac2d1060c2b049b4eebc176d3823f82f9ea76.tar.gz rspamd-d78ac2d1060c2b049b4eebc176d3823f82f9ea76.zip |
* Add ability to add maps from lua scripts and access theirs elements
* Add whitelist module for whitelisting score for some ip/from addresses
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/main.c b/src/main.c index 4b811bb36..4a02fa159 100644 --- a/src/main.c +++ b/src/main.c @@ -674,24 +674,6 @@ main (int argc, char **argv, char **env) exit (-errno); } -#ifndef WITHOUT_PERL - /* Init perl interpreter */ - dTHXa (perl_interpreter); - PERL_SYS_INIT3 (&argc, &argv, &env); - perl_interpreter = perl_alloc (); - if (perl_interpreter == NULL) { - msg_err ("main: cannot allocate perl interpreter, %s", strerror (errno)); - exit (-errno); - } - - PERL_SET_CONTEXT (perl_interpreter); - perl_construct (perl_interpreter); - perl_parse (perl_interpreter, xs_init, 3, args, NULL); - init_perl_filters (cfg); -#elif defined(WITH_LUA) - init_lua_filters (cfg); -#endif - /* Block signals to use sigsuspend in future */ sigprocmask (SIG_BLOCK, &signals.sa_mask, NULL); @@ -726,6 +708,24 @@ main (int argc, char **argv, char **env) l = g_list_next (l); } +#ifndef WITHOUT_PERL + /* Init perl interpreter */ + dTHXa (perl_interpreter); + PERL_SYS_INIT3 (&argc, &argv, &env); + perl_interpreter = perl_alloc (); + if (perl_interpreter == NULL) { + msg_err ("main: cannot allocate perl interpreter, %s", strerror (errno)); + exit (-errno); + } + + PERL_SET_CONTEXT (perl_interpreter); + perl_construct (perl_interpreter); + perl_parse (perl_interpreter, xs_init, 3, args, NULL); + init_perl_filters (cfg); +#elif defined(WITH_LUA) + init_lua_filters (cfg); +#endif + rspamd->workers = g_hash_table_new (g_direct_hash, g_direct_equal); spawn_workers (rspamd, TRUE); |