]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: spoe: Add a pointer on the filter config in the spoe_agent structure
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 2 Aug 2021 15:51:01 +0000 (17:51 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Aug 2021 08:07:43 +0000 (10:07 +0200)
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.

include/haproxy/spoe-t.h
src/flt_spoe.c

index dbfe0cb476be599060497717d9f7e0f0217b7bd4..197f47b7fdee70f0f38a973ec15eb7e696f0fa2b 100644 (file)
@@ -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 */
index 3d68fc56df8b2142f7aa1c3d8c1fc6b896ed5ec8..90aed12a94993d168fee1c199ddf6fcb68f42ae2 100644 (file)
@@ -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. */