mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-05-04 12:41:00 +02:00
BUILD: cfgparse: keep a single "curproxy"
Surprisingly, commit 00e00fb42 ("REORG: cfgparse: extract curproxy as a
global variable") caused a build breakage on the CI but not on two
developers' machines. It looks like it's dependent on the linker version
used. What happens is that flt_spoe.c already has a curproxy struct which
already is a copy of the one passed by the parser because it also needed
it to be exported, so they now conflict. Let's just drop this unused copy.
This commit is contained in:
parent
7fccccccea
commit
bbc3e4463e
@ -102,7 +102,7 @@ struct list postparsers = LIST_HEAD_INIT(postparsers);
|
||||
extern struct proxy *mworker_proxy;
|
||||
|
||||
/* curproxy is only valid during parsing and will be NULL afterwards. */
|
||||
struct proxy *curproxy;
|
||||
struct proxy *curproxy = NULL;
|
||||
|
||||
char *cursection = NULL;
|
||||
int cfg_maxpconn = 0; /* # of simultaneous connections per proxy (-N) */
|
||||
|
||||
@ -71,9 +71,6 @@ const char *spoe_filter_id = "SPOE filter";
|
||||
/* Set if the handle on SIGUSR1 is registered */
|
||||
static int sighandler_registered = 0;
|
||||
|
||||
/* proxy used during the parsing */
|
||||
struct proxy *curproxy = NULL;
|
||||
|
||||
/* The name of the SPOE engine, used during the parsing */
|
||||
char *curengine = NULL;
|
||||
|
||||
@ -4169,12 +4166,11 @@ parse_spoe_flt(char **args, int *cur_arg, struct proxy *px,
|
||||
cfg_register_section("spoe-message", cfg_parse_spoe_message, NULL);
|
||||
|
||||
/* Parse SPOE filter configuration file */
|
||||
BUG_ON(px != curproxy);
|
||||
curengine = engine;
|
||||
curproxy = px;
|
||||
curagent = NULL;
|
||||
curmsg = NULL;
|
||||
ret = readcfgfile(file);
|
||||
curproxy = NULL;
|
||||
|
||||
/* unregister SPOE sections and restore previous sections */
|
||||
cfg_unregister_sections();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user