]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: debug: Always access the stream-int via the conn-stream
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Dec 2021 12:38:12 +0000 (13:38 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 24 Feb 2022 10:00:02 +0000 (11:00 +0100)
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.

src/debug.c

index 0d4a3f3038bead8a2f5db28887b80be0cc27a886..c0c6853dda3aabb893ab6c39fca08dd23bf3df3c 100644 (file)
@@ -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);