From: Willy Tarreau Date: Mon, 7 Jan 2019 09:10:07 +0000 (+0100) Subject: MINOR: stream/cli: fix the location of the waiting flag in "show sess all" X-Git-Tag: v2.0-dev1~259 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=adf7a15bd1d41c45a214410745479e3381ef45de;p=thirdparty%2Fhaproxy.git MINOR: stream/cli: fix the location of the waiting flag in "show sess all" 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. --- diff --git a/src/stream.c b/src/stream.c index aabc6c9ab3..3dd5a20bad 100644 --- a/src/stream.c +++ b/src/stream.c @@ -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",