REORG/MAJOR: extract "struct buffer" from "struct channel"
At the moment, the struct is still embedded into the struct channel, but
all the functions have been updated to use struct buffer only when possible,
otherwise struct channel. Some functions would likely need to be splitted
between a buffer-layer primitive and a channel-layer function.
Later the buffer should become a pointer in the struct buffer, but doing so
requires a few changes to the buffer allocation calls.
diff --git a/src/session.c b/src/session.c
index 3984104..fa5efae 100644
--- a/src/session.c
+++ b/src/session.c
@@ -225,7 +225,7 @@
goto out_free_req; /* no memory */
/* initialize the request buffer */
- s->req->size = global.tune.bufsize;
+ s->req->buf.size = global.tune.bufsize;
buffer_init(s->req);
s->req->prod = &s->si[0];
s->req->cons = &s->si[1];
@@ -242,7 +242,7 @@
s->req->analyse_exp = TICK_ETERNITY;
/* initialize response buffer */
- s->rep->size = global.tune.bufsize;
+ s->rep->buf.size = global.tune.bufsize;
buffer_init(s->rep);
s->rep->prod = &s->si[1];
s->rep->cons = &s->si[0];