aboutsummaryrefslogtreecommitdiffstats
path: root/src/cfg_file.y
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-10-16 19:13:06 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-10-16 19:13:06 +0400
commitd7a22c22ccc8aa3cd95c461d13f538b6d321ddc1 (patch)
tree007c1c8bc33899e76965ccfbb5b75021092d6b01 /src/cfg_file.y
parent8909ac45092c23bb6283ae389a5f6c94de49ad9d (diff)
downloadrspamd-d7a22c22ccc8aa3cd95c461d13f538b6d321ddc1.tar.gz
rspamd-d7a22c22ccc8aa3cd95c461d13f538b6d321ddc1.zip
* Add growing coefficient to factors consolidation callback
* Fix registering functions from lua
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r--src/cfg_file.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y
index 6e0b8a20f..c51e5a853 100644
--- a/src/cfg_file.y
+++ b/src/cfg_file.y
@@ -59,7 +59,7 @@ struct rspamd_view *cur_view = NULL;
%token DELIVERY LMTP ENABLED AGENT SECTION LUACODE RAW_MODE PROFILE_FILE COUNT
%token VIEW IP FROM SYMBOLS
%token AUTOLEARN MIN_MARK MAX_MARK
-%token SETTINGS USER_SETTINGS DOMAIN_SETTINGS SYMBOL PATH SKIP_CHECK
+%token SETTINGS USER_SETTINGS DOMAIN_SETTINGS SYMBOL PATH SKIP_CHECK GROW_FACTOR
%type <string> STRING
%type <string> VARIABLE
@@ -465,7 +465,13 @@ factorparam:
double *tmp = memory_pool_alloc (cfg->cfg_pool, sizeof (double));
*tmp = $3;
g_hash_table_insert (cfg->factors, $1, tmp);
- };
+ }
+ | GROW_FACTOR EQSIGN FRACT {
+ cfg->grow_factor = $3;
+ }
+ | GROW_FACTOR EQSIGN NUMBER {
+ cfg->grow_factor = $3;
+ }
modules:
MODULES OBRACE modulesbody EBRACE