]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream/cli: fix the location of the waiting flag in "show sess all"
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Jan 2019 09:10:07 +0000 (10:10 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Jan 2019 09:10:07 +0000 (10:10 +0100)
The "waiting" flag indicates if the stream is waiting for some memory,
and was placed on the same output line as the txn for ease of reading.
But since 1.6 the txn is not part of the stream anymore so this output
was placed under a condition, resulting in "waiting" to appear only
when a txn is present. Let's move it upper, closer to the stream's
flags to fix this.

This may safely be backported though it has little value for older
versions.

src/stream.c

index aabc6c9ab33fa170ad1db321cae7e772c84dae30..3dd5a20badb646a7ed164f73c2b0f69484891e14 100644 (file)
@@ -2850,8 +2850,9 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st
                }
 
                chunk_appendf(&trash,
-                            "  flags=0x%x, conn_retries=%d, srv_conn=%p, pend_pos=%p\n",
-                            strm->flags, strm->si[1].conn_retries, strm->srv_conn, strm->pend_pos);
+                            "  flags=0x%x, conn_retries=%d, srv_conn=%p, pend_pos=%p waiting=%d\n",
+                            strm->flags, strm->si[1].conn_retries, strm->srv_conn, strm->pend_pos,
+                            !LIST_ISEMPTY(&strm->buffer_wait.list));
 
                chunk_appendf(&trash,
                             "  frontend=%s (id=%u mode=%s), listener=%s (id=%u)",
@@ -2950,9 +2951,9 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st
 
                if (strm->txn)
                        chunk_appendf(&trash,
-                            "  txn=%p flags=0x%x meth=%d status=%d req.st=%s rsp.st=%s waiting=%d\n",
+                            "  txn=%p flags=0x%x meth=%d status=%d req.st=%s rsp.st=%s\n",
                              strm->txn, strm->txn->flags, strm->txn->meth, strm->txn->status,
-                             h1_msg_state_str(strm->txn->req.msg_state), h1_msg_state_str(strm->txn->rsp.msg_state), !LIST_ISEMPTY(&strm->buffer_wait.list));
+                             h1_msg_state_str(strm->txn->req.msg_state), h1_msg_state_str(strm->txn->rsp.msg_state));
 
                chunk_appendf(&trash,
                             "  si[0]=%p (state=%s flags=0x%02x endp0=%s:%p exp=%s et=0x%03x sub=%d)\n",