MINOR: pattern: export the global temporary pattern

The global pattern is used for pattern conversions. Export it under the
name "temp_pattern" so that it can later be used by ACLs.
This commit is contained in:
Willy Tarreau 2011-12-16 15:23:14 +01:00
parent 5dc1e98905
commit 5e6cc4aad8
2 changed files with 4 additions and 2 deletions

View File

@ -25,6 +25,8 @@
#include <types/pattern.h>
#include <types/stick_table.h>
extern struct pattern temp_pattern;
struct pattern_expr *pattern_parse_expr(char **str, int *idx, char *err, int err_size);
struct pattern *pattern_process(struct proxy *px, struct session *l4,
void *l7, int dir, struct pattern_expr *expr,

View File

@ -18,7 +18,7 @@
#include <common/standard.h>
/* static structure used on pattern_process if <p> is NULL*/
static struct pattern spattern;
struct pattern temp_pattern = { };
/* trash chunk used for pattern conversions */
static struct chunk trash_chunk;
@ -469,7 +469,7 @@ struct pattern *pattern_process(struct proxy *px, struct session *l4, void *l7,
struct pattern_conv_expr *conv_expr;
if (p == NULL)
p = &spattern;
p = &temp_pattern;
if (!expr->fetch->process(px, l4, l7, dir, expr->arg_p, expr->arg_i, &p->data))
return NULL;