diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-04-06 20:48:01 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-04-06 20:48:01 +0400 |
commit | 9c7a93b3cc0c866cd449e568f1c2054661f92786 (patch) | |
tree | 7bfa880e6192c300f7d402396d33f6a6783b12de /src/expressions.c | |
parent | 94cfcac7c50e1d2be5d93ed778ab91e6983a5fad (diff) | |
download | rspamd-9c7a93b3cc0c866cd449e568f1c2054661f92786.tar.gz rspamd-9c7a93b3cc0c866cd449e568f1c2054661f92786.zip |
* Parse function's regexp using not temporary task pools, but permament config pool
Diffstat (limited to 'src/expressions.c')
-rw-r--r-- | src/expressions.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/expressions.c b/src/expressions.c index 4cacea029..2ba975b79 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -809,7 +809,7 @@ rspamd_content_type_compare_param (struct worker_task *task, GList *args) if (*param_pattern == '/') { /* This is regexp, so compile and create g_regexp object */ if ((re = re_cache_check (param_pattern)) == NULL) { - re = parse_regexp (task->task_pool, param_pattern); + re = parse_regexp (task->cfg->cfg_pool, param_pattern); if (re == NULL) { msg_warn ("rspamd_content_type_compare_param: cannot compile regexp for function"); return FALSE; @@ -905,7 +905,7 @@ rspamd_content_type_is_subtype (struct worker_task *task, GList *args) if (*param_pattern == '/') { /* This is regexp, so compile and create g_regexp object */ if ((re = re_cache_check (param_pattern)) == NULL) { - re = parse_regexp (task->task_pool, param_pattern); + re = parse_regexp (task->cfg->cfg_pool, param_pattern); if (re == NULL) { msg_warn ("rspamd_content_type_compare_param: cannot compile regexp for function"); return FALSE; @@ -964,7 +964,7 @@ rspamd_content_type_is_type (struct worker_task *task, GList *args) if (*param_pattern == '/') { /* This is regexp, so compile and create g_regexp object */ if ((re = re_cache_check (param_pattern)) == NULL) { - re = parse_regexp (task->task_pool, param_pattern); + re = parse_regexp (task->cfg->cfg_pool, param_pattern); if (re == NULL) { msg_warn ("rspamd_content_type_compare_param: cannot compile regexp for function"); return FALSE; @@ -1148,7 +1148,7 @@ compare_subtype (struct worker_task *task, const localContentType *ct, char *sub if (*subtype == '/') { /* This is regexp, so compile and create g_regexp object */ if ((re = re_cache_check (subtype)) == NULL) { - re = parse_regexp (task->task_pool, subtype); + re = parse_regexp (task->cfg->cfg_pool, subtype); if (re == NULL) { msg_warn ("compare_subtype: cannot compile regexp for function"); return FALSE; @@ -1215,7 +1215,7 @@ common_has_content_part (struct worker_task *task, char *param_type, char *param if (*param_type == '/') { /* This is regexp, so compile and create g_regexp object */ if ((re = re_cache_check (param_type)) == NULL) { - re = parse_regexp (task->task_pool, param_type); + re = parse_regexp (task->cfg->cfg_pool, param_type); if (re == NULL) { msg_warn ("rspamd_has_content_part: cannot compile regexp for function"); cur = g_list_next (cur); |