CLEANUP: channel: fix comment in ci_putblk.
The comment is outdated and refer to an old code.
Should be backported until branch 1.5
(cherry picked from commit 147b3f05b5d5c3ec33f9d3ef2a6f79bbda1b3617)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit bfc40dce3a9c75a1a78fb1581cc6e52a891a4a80)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit afa13f87c36429bc3efc48a6306a4980b4220c80)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 99b4aa61d4a01dd710b0514349a8a6379abb9ddd)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
diff --git a/src/channel.c b/src/channel.c
index 09ea0e3..7a48c37 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -153,8 +153,9 @@
max = channel_recv_limit(chn);
if (unlikely(len > max - c_data(chn))) {
/* we can't write this chunk right now because the buffer is
- * almost full or because the block is too large. Return the
- * available space or -2 if impossible.
+ * almost full or because the block is too large. Returns
+ * -3 if block is too large for this buffer. Or -1 if the
+ * room left is not large enough.
*/
if (len > max)
return -3;