aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-27 14:30:15 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-27 14:30:15 +0000
commit46ff8098925af138a68a4df0b4c6625331c5a6c3 (patch)
tree584ca85b1014a0b46fb94e84146424f186e07b12 /src/plugins/regexp.c
parent65965fabad7969eb1d87df659679b73437415f52 (diff)
downloadrspamd-46ff8098925af138a68a4df0b4c6625331c5a6c3.tar.gz
rspamd-46ff8098925af138a68a4df0b4c6625331c5a6c3.zip
Improve informational message from regexp module
Diffstat (limited to 'src/plugins/regexp.c')
-rw-r--r--src/plugins/regexp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index 9535ab1e6..08c38ffb9 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -111,7 +111,7 @@ regexp_module_config (struct rspamd_config *cfg)
struct regexp_module_item *cur_item;
const ucl_object_t *sec, *value, *elt;
ucl_object_iter_t it = NULL;
- gint res = TRUE, id, nrules = 0;
+ gint res = TRUE, id, nre = 0, nlua = 0;
if (!rspamd_config_is_module_enabled (cfg, "regexp")) {
return TRUE;
@@ -151,6 +151,7 @@ regexp_module_config (struct rspamd_config *cfg)
process_regexp_item,
cur_item,
SYMBOL_TYPE_NORMAL, -1);
+ nre ++;
}
}
else if (value->type == UCL_USERDATA) {
@@ -165,6 +166,7 @@ regexp_module_config (struct rspamd_config *cfg)
process_regexp_item,
cur_item,
SYMBOL_TYPE_NORMAL, -1);
+ nlua ++;
}
else if (value->type == UCL_OBJECT) {
const gchar *description = NULL, *group = NULL,
@@ -191,6 +193,7 @@ regexp_module_config (struct rspamd_config *cfg)
}
else {
valid_expression = TRUE;
+ nre ++;
}
}
else {
@@ -201,6 +204,7 @@ regexp_module_config (struct rspamd_config *cfg)
}
else {
is_lua = TRUE;
+ nlua ++;
cur_item = rspamd_mempool_alloc0 (
regexp_module_ctx->regexp_pool,
sizeof (struct regexp_module_item));
@@ -215,7 +219,6 @@ regexp_module_config (struct rspamd_config *cfg)
process_regexp_item,
cur_item,
SYMBOL_TYPE_NORMAL, -1);
- nrules ++;
elt = ucl_object_find_key (value, "condition");
@@ -267,7 +270,8 @@ regexp_module_config (struct rspamd_config *cfg)
}
}
- msg_info_config ("init internal regexp module, %d regexp rules loaded", nrules);
+ msg_info_config ("init internal regexp module, %d regexp rules and %d "
+ "lua rules are loaded", nre, nlua);
return res;
}