diff --git a/include/haproxy/applet-t.h b/include/haproxy/applet-t.h index af9560ad6..6b9a710d9 100644 --- a/include/haproxy/applet-t.h +++ b/include/haproxy/applet-t.h @@ -60,7 +60,6 @@ struct appctx { unsigned int st0; /* CLI state for stats, session state for peers */ unsigned int st1; /* prompt/payload (bitwise OR of APPCTX_CLI_ST1_*) for stats, session error for peers */ struct buffer *chunk; /* used to store unfinished commands */ - unsigned int st2; /* output state for stats, unused by peers */ struct applet *applet; /* applet this context refers to */ struct conn_stream *owner; struct cs_endpoint *endp; @@ -75,6 +74,15 @@ struct appctx { struct freq_ctr call_rate; /* appctx call rate */ struct list wait_entry; /* entry in a list of waiters for an event (e.g. ring events) */ + /* WARNING: the entries below are only kept for compatibility with + * possible external code but will disappear in 2.7, you must use the + * cleaner svcctx now (look at "show fd" for an example). + */ + union { + __attribute__((deprecated)) unsigned int st2; + unsigned int _st2; + }; + /* This anonymous union is temporary for 2.6 to avoid a new API change * after 2.6 while keeping the compatibility with pre-2.7 code. * The pointer seen by application code is appctx->svcctx. In 2.7 the diff --git a/src/cli.c b/src/cli.c index f13cfd00d..7853a5b1b 100644 --- a/src/cli.c +++ b/src/cli.c @@ -745,7 +745,7 @@ static int cli_parse_request(struct appctx *appctx) int i = 0; struct cli_kw *kw; - appctx->st2 = 0; + appctx->_st2 = 0; /* temporary for 2.6: let's make sure we clean the whole shared * context. diff --git a/src/stream.c b/src/stream.c index aaf42f39f..d86dbf315 100644 --- a/src/stream.c +++ b/src/stream.c @@ -3347,7 +3347,7 @@ static int stats_dump_full_strm_to_buffer(struct conn_stream *cs, struct stream tmpctx, tmpctx->st0, tmpctx->st1, - tmpctx->st2, + tmpctx->_st2, tmpctx->applet->name, tmpctx->t->thread_mask, tmpctx->t->nice, tmpctx->t->calls, read_freq_ctr(&tmpctx->call_rate), @@ -3385,7 +3385,7 @@ static int stats_dump_full_strm_to_buffer(struct conn_stream *cs, struct stream tmpctx, tmpctx->st0, tmpctx->st1, - tmpctx->st2, + tmpctx->_st2, tmpctx->applet->name, tmpctx->t->thread_mask, tmpctx->t->nice, tmpctx->t->calls, read_freq_ctr(&tmpctx->call_rate),