mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-04 02:19:09 +00:00
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:
parent
5dc1e98905
commit
5e6cc4aad8
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user