From: Christopher Faulet Date: Tue, 19 Apr 2022 08:35:22 +0000 (+0200) Subject: DEV: stream: Fix conn-streams dump in full stream message X-Git-Tag: v2.6-dev7~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0264212ba370ff396de593bda31631dfd3108b49;p=thirdparty%2Fhaproxy.git DEV: stream: Fix conn-streams dump in full stream message Since the recent changes about the conn-streams, the stream dump in "show sess all" command is a bit mangled. front and back conn-stream are now properly displayed (csf and csb). In addition, when there is no backend endpoint, "APPCTX" was always reported. Now, "NONE" is reported in this case. It is 2.6-specific. No backport needed. --- diff --git a/src/stream.c b/src/stream.c index dd7eb7b90c..e428c0c266 100644 --- a/src/stream.c +++ b/src/stream.c @@ -3308,9 +3308,9 @@ static int stats_dump_full_strm_to_buffer(struct conn_stream *cs, struct stream strm->txn->req.flags, strm->txn->rsp.flags); csf = strm->csf; - chunk_appendf(&trash, " cs=%p csf=0x%08x state=%s endp=%s,%p,0x%08x sub=%d\n", + chunk_appendf(&trash, " csf=%p flags=0x%08x state=%s endp=%s,%p,0x%08x sub=%d\n", csf, csf->flags, cs_state_str(csf->state), - (csf->endp->flags & CS_EP_T_MUX ? "CONN" : "APPCTX"), + (csf->endp->flags & CS_EP_T_MUX ? "CONN" : (csf->endp->flags & CS_EP_T_APPLET ? "APPCTX" : "NONE")), csf->endp->target, csf->endp->flags, csf->wait_event.events); if ((conn = cs_conn(csf)) != NULL) { @@ -3347,9 +3347,9 @@ static int stats_dump_full_strm_to_buffer(struct conn_stream *cs, struct stream } csb = strm->csb; - chunk_appendf(&trash, " cs=%p csb=0x%08x state=%s endp=%s,%p,0x%08x sub=%d\n", + chunk_appendf(&trash, " csb=%p flags=0x%08x state=%s endp=%s,%p,0x%08x sub=%d\n", csb, csb->flags, cs_state_str(csb->state), - (csb->endp->flags & CS_EP_T_MUX ? "CONN" : "APPCTX"), + (csb->endp->flags & CS_EP_T_MUX ? "CONN" : (csb->endp->flags & CS_EP_T_APPLET ? "APPCTX" : "NONE")), csb->endp->target, csb->endp->flags, csb->wait_event.events); if ((conn = cs_conn(csb)) != NULL) { chunk_appendf(&trash,