From: Christopher Faulet Date: Tue, 20 Jun 2023 11:33:23 +0000 (+0200) Subject: REORG: mux-h1: Rename functions to emit chunk size/crlf in the output buffer X-Git-Tag: v2.9-dev1~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e081efd44825e3b232f976347b61049d764a4fbd;p=thirdparty%2Fhaproxy.git REORG: mux-h1: Rename functions to emit chunk size/crlf in the output buffer h1_emit_chunk_size() and h1_emit_chunk_crlf() functions were renamed, respectively, h1_prepend_chunk_size() and h1_append_chunk_crlf(). --- diff --git a/src/mux_h1.c b/src/mux_h1.c index f8bce76ed0..3986d32b0a 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -1406,7 +1406,7 @@ static void h1_capture_bad_message(struct h1c *h1c, struct h1s *h1s, * head. The caller is responsible for ensuring there is enough room left before * the buffer's head for the string. */ -static void h1_emit_chunk_size(struct buffer *buf, size_t chksz) +static void h1_prepend_chunk_size(struct buffer *buf, size_t chksz) { char *beg, *end; @@ -1422,7 +1422,7 @@ static void h1_emit_chunk_size(struct buffer *buf, size_t chksz) /* Emit a CRLF after the data of the buffer . The caller is responsible for * ensuring there is enough room left in the buffer for the string. */ -static void h1_emit_chunk_crlf(struct buffer *buf) +static void h1_append_chunk_crlf(struct buffer *buf) { *(b_peek(buf, b_data(buf))) = '\r'; *(b_peek(buf, b_data(buf) + 1)) = '\n'; @@ -2492,8 +2492,8 @@ static size_t h1_make_data(struct h1s *h1s, struct h1m *h1m, struct buffer *buf, * struct htx to write the chunk envelope. It should be enough. */ if (h1m->flags & H1_MF_CHNK) { - h1_emit_chunk_size(&h1c->obuf, count); - h1_emit_chunk_crlf(&h1c->obuf); + h1_prepend_chunk_size(&h1c->obuf, count); + h1_append_chunk_crlf(&h1c->obuf); if (h1m->state == H1_MSG_DONE) { /* Emit the last chunk too at the buffer's end */ b_putblk(&h1c->obuf, "0\r\n\r\n", 5);