]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DEBUG: stream: Fix stream trace message to print response buffer state
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Mar 2022 14:48:55 +0000 (15:48 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Mar 2022 17:31:44 +0000 (18:31 +0100)
Channels buffer state is displayed in the strem trace messages. However,
because of a typo, the request buffer was used instead of the response one.

This patch should be backported as far as 2.2.

src/stream.c

index 44fc4c930d65a2baf184d2ba303a48e471701e40..cdd1498c9207a532cf8e4524abe986e023a7dc35 100644 (file)
@@ -250,8 +250,8 @@ static void strm_trace(enum trace_level level, uint64_t mask, const struct trace
                chunk_appendf(&trace_buf, " buf=(%u@%p+%u/%u, %u@%p+%u/%u)",
                              (unsigned int)b_data(&req->buf), b_orig(&req->buf),
                              (unsigned int)b_head_ofs(&req->buf), (unsigned int)b_size(&req->buf),
-                             (unsigned int)b_data(&req->buf), b_orig(&req->buf),
-                             (unsigned int)b_head_ofs(&req->buf), (unsigned int)b_size(&req->buf));
+                             (unsigned int)b_data(&res->buf), b_orig(&res->buf),
+                             (unsigned int)b_head_ofs(&res->buf), (unsigned int)b_size(&res->buf));
        }
 
        /* If msg defined, display htx info if defined (level > USER) */