From: Christopher Faulet Date: Mon, 2 Aug 2021 15:51:01 +0000 (+0200) Subject: MINOR: spoe: Add a pointer on the filter config in the spoe_agent structure X-Git-Tag: v2.5-dev4~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=434b8525ee333f511b5461eae41b23842d3636d4;p=thirdparty%2Fhaproxy.git MINOR: spoe: Add a pointer on the filter config in the spoe_agent structure There was no way to access the SPOE filter configuration from the agent object. However it could be handy to have it. And in fact, this will be required to fix a bug. --- diff --git a/include/haproxy/spoe-t.h b/include/haproxy/spoe-t.h index dbfe0cb476..197f47b7fd 100644 --- a/include/haproxy/spoe-t.h +++ b/include/haproxy/spoe-t.h @@ -280,6 +280,7 @@ struct spoe_agent { } timeout; /* Config info */ + struct spoe_config *spoe_conf; /* SPOE filter config */ char *var_pfx; /* Prefix used for vars set by the agent */ char *var_on_error; /* Variable to set when an error occurred, in the TXN scope */ char *var_t_process; /* Variable to set to report the processing time of the last event/group, in the TXN scope */ diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 3d68fc56df..90aed12a94 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -4405,6 +4405,7 @@ parse_spoe_flt(char **args, int *cur_arg, struct proxy *px, conf->id = strdup(engine ? engine : curagent->id); conf->agent = curagent; + curagent->spoe_conf = conf; /* Start agent's proxy initialization here. It will be finished during * the filter init. */