From: Christopher Faulet Date: Thu, 23 Dec 2021 12:38:12 +0000 (+0100) Subject: MINOR: debug: Always access the stream-int via the conn-stream X-Git-Tag: v2.6-dev2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d3c8aa15401c15aea9af97ef1374ecb63d4c15f;p=thirdparty%2Fhaproxy.git MINOR: debug: Always access the stream-int via the conn-stream To be able to move the stream-interface from the stream to the conn-stream, all access to the SI is done via the conn-stream. This patch is limited to the debug part. --- diff --git a/src/debug.c b/src/debug.c index 0d4a3f3038..c0c6853dda 100644 --- a/src/debug.c +++ b/src/debug.c @@ -684,17 +684,17 @@ static int debug_parse_cli_stream(char **args, char *payload, struct appctx *app } else if (isteq(name, ist("res.w"))) { ptr = (!s || !may_access(s)) ? NULL : &s->res.wex; size = sizeof(s->res.wex); } else if (isteq(name, ist("sif.f"))) { - ptr = (!s || !may_access(s)) ? NULL : &s->si[0].flags; size = sizeof(s->si[0].flags); + ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csf)->flags; size = sizeof(cs_si(s->csf)->flags); } else if (isteq(name, ist("sib.f"))) { - ptr = (!s || !may_access(s)) ? NULL : &s->si[1].flags; size = sizeof(s->si[1].flags); + ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csb)->flags; size = sizeof(cs_si(s->csb)->flags); } else if (isteq(name, ist("sif.x"))) { - ptr = (!s || !may_access(s)) ? NULL : &s->si[0].exp; size = sizeof(s->si[0].exp); + ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csf)->exp; size = sizeof(cs_si(s->csf)->exp); } else if (isteq(name, ist("sib.x"))) { - ptr = (!s || !may_access(s)) ? NULL : &s->si[1].exp; size = sizeof(s->si[1].exp); + ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csb)->exp; size = sizeof(cs_si(s->csb)->exp); } else if (isteq(name, ist("sif.s"))) { - ptr = (!s || !may_access(s)) ? NULL : &s->si[0].state; size = sizeof(s->si[0].state); + ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csf)->state; size = sizeof(cs_si(s->csf)->state); } else if (isteq(name, ist("sib.s"))) { - ptr = (!s || !may_access(s)) ? NULL : &s->si[1].state; size = sizeof(s->si[1].state); + ptr = (!s || !may_access(s)) ? NULL : &cs_si(s->csf)->state; size = sizeof(cs_si(s->csb)->state); } else if (isteq(name, ist("wake"))) { if (s && may_access(s) && may_access((void *)s + sizeof(*s) - 1)) task_wakeup(s->task, TASK_WOKEN_TIMER|TASK_WOKEN_IO|TASK_WOKEN_MSG);