From: Vsevolod Stakhov Date: Thu, 23 Apr 2009 14:41:00 +0000 (+0400) Subject: * Handle parsed regexp as not-parsed regexps in expressions X-Git-Tag: 0.2.7~176 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3c91b53ed3ef7c5aecdf09954cb7d92f84cbeec;p=thirdparty%2Frspamd.git * Handle parsed regexp as not-parsed regexps in expressions --- diff --git a/src/expressions.c b/src/expressions.c index ba24ae2521..cc5e090722 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -707,7 +707,7 @@ get_function_arg (struct expression *expr, struct worker_task *task, gboolean wa } if (expr->next == NULL) { res = memory_pool_alloc (task->task_pool, sizeof (struct expression_argument)); - if (expr->type == EXPR_REGEXP || expr->type == EXPR_STR) { + if (expr->type == EXPR_REGEXP || expr->type == EXPR_STR || expr->type == EXPR_REGEXP_PARSED) { res->type = EXPRESSION_ARGUMENT_NORMAL; res->data = expr->content.operand; } @@ -729,7 +729,7 @@ get_function_arg (struct expression *expr, struct worker_task *task, gboolean wa it = expr; while (it) { - if (it->type == EXPR_REGEXP || it->type == EXPR_STR) { + if (it->type == EXPR_REGEXP || it->type == EXPR_REGEXP_PARSED || it->type == EXPR_STR) { g_queue_free (stack); res->type = EXPRESSION_ARGUMENT_EXPR; res->data = expr;