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.
diff --git a/include/proto/pattern.h b/include/proto/pattern.h
index ea8cf0d..25a00d6 100644
--- a/include/proto/pattern.h
+++ b/include/proto/pattern.h
@@ -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,
diff --git a/src/pattern.c b/src/pattern.c
index 59ff010..bebeabe 100644
--- a/src/pattern.c
+++ b/src/pattern.c
@@ -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_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;