From 1ac95445e62b9c4e9b8d99d8975ffe378a89d301 Mon Sep 17 00:00:00 2001 From: Amaury Denoyelle Date: Thu, 9 Dec 2021 10:07:23 +0100 Subject: [PATCH] MINOR: hq-interop: refix tx buffering Incorrect usage of the buffer API : b_room() replaces b_size() to ensure that we have enough size for http data copy. --- src/hq_interop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hq_interop.c b/src/hq_interop.c index 9d0d56635..9af937f70 100644 --- a/src/hq_interop.c +++ b/src/hq_interop.c @@ -98,8 +98,8 @@ static size_t hq_interop_snd_buf(struct conn_stream *cs, struct buffer *buf, if (fsize > count) fsize = count; - if (b_size(&outbuf) < fsize) - fsize = b_size(&outbuf); + if (b_room(&outbuf) < fsize) + fsize = b_room(&outbuf); if (!fsize) { qcs->flags |= QC_SF_BLK_MROOM;