MINOR: compression: pass the channel to http_compression_buffer_end()
This will be needed to access the output data count from the channel
after the buffer/channel changes.
diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c
index 99a767c..ca2ab7c 100644
--- a/src/flt_http_comp.c
+++ b/src/flt_http_comp.c
@@ -61,7 +61,7 @@
struct buffer *in,
struct buffer *out, int sz);
static int http_compression_buffer_end(struct comp_state *st, struct stream *s,
- struct buffer **in, struct buffer **out,
+ struct channel *chn, struct buffer **out,
int end);
/***********************************************************************/
@@ -306,7 +306,7 @@
st->consumed = len - st->hdrs_len - st->tlrs_len;
b_adv(msg->chn->buf, flt_rsp_fwd(filter) + st->hdrs_len);
- ret = http_compression_buffer_end(st, s, &msg->chn->buf, &zbuf, msg->msg_state >= HTTP_MSG_TRAILERS);
+ ret = http_compression_buffer_end(st, s, msg->chn, &zbuf, msg->msg_state >= HTTP_MSG_TRAILERS);
b_rew(msg->chn->buf, flt_rsp_fwd(filter) + st->hdrs_len);
if (ret < 0)
return ret;
@@ -666,10 +666,10 @@
*/
static int
http_compression_buffer_end(struct comp_state *st, struct stream *s,
- struct buffer **in, struct buffer **out,
+ struct channel *chn, struct buffer **out,
int end)
{
- struct buffer *ib = *in, *ob = *out;
+ struct buffer *ib = chn->buf, *ob = *out;
char *tail;
int to_forward, left;
@@ -774,7 +774,7 @@
}
/* swap the buffers */
- *in = ob;
+ chn->buf = ob;
*out = ib;