From: Willy Tarreau Date: Sun, 6 Jun 2010 15:39:30 +0000 (+0200) Subject: [MINOR] stick_table: export the stick_table_key X-Git-Tag: v1.5-dev8~559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41883e2041bdd635dfc9402cef9bd6d1863268ce;p=thirdparty%2Fhaproxy.git [MINOR] stick_table: export the stick_table_key This one is huge and will be needed by other portions of code for various data lookups. Let's not have them allocate it in the stack. --- diff --git a/include/proto/stick_table.h b/include/proto/stick_table.h index e1a324d732..87a550b86b 100644 --- a/include/proto/stick_table.h +++ b/include/proto/stick_table.h @@ -28,6 +28,8 @@ #define stktable_data_size(type) (sizeof(((union stktable_data*)0)->type)) #define stktable_data_cast(ptr, type) ((union stktable_data*)(ptr))->type +extern struct stktable_key static_table_key; + struct stksess *stksess_new(struct stktable *t, struct stktable_key *key); void stksess_setkey(struct stktable *t, struct stksess *ts, struct stktable_key *key); void stksess_free(struct stktable *t, struct stksess *ts); diff --git a/src/stick_table.c b/src/stick_table.c index 017362f700..9f7feddab2 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -29,8 +29,8 @@ #include -/* static structure used to return a table key built from a pattern */ -static struct stktable_key static_table_key; +/* structure used to return a table key built from a pattern */ +struct stktable_key static_table_key; /* * Free an allocated sticky session , and decrease sticky sessions counter