max = buf_room_for_htx_data(&h1c->ibuf);
if (max) {
- int aligned = 0;
h1c->flags &= ~H1C_F_IN_FULL;
b_realign_if_empty(&h1c->ibuf);
/* try to pre-align the buffer like the rxbufs will be
* to optimize memory copies.
*/
- h1c->ibuf.data = sizeof(struct htx);
- aligned = 1;
- }
- ret = conn->xprt->rcv_buf(conn, &h1c->ibuf, max, 0);
- if (aligned) {
- h1c->ibuf.data -= sizeof(struct htx);
h1c->ibuf.head = sizeof(struct htx);
}
+ ret = conn->xprt->rcv_buf(conn, &h1c->ibuf, max, 0);
}
if (ret > 0) {
rcvd = 1;
}
do {
- int aligned = 0;
-
b_realign_if_empty(buf);
if (!b_data(buf) && (h2c->proxy->options2 & PR_O2_USE_HTX)) {
/* HTX in use : try to pre-align the buffer like the
* have a few bytes there.
*/
max = buf_room_for_htx_data(buf) + 9;
- buf->head = 0;
- buf->data = sizeof(struct htx) - 9;
- aligned = 1;
+ buf->head = sizeof(struct htx) - 9;
}
else
max = b_room(buf);
ret = conn->xprt->rcv_buf(conn, buf, max, 0);
else
ret = 0;
-
- if (aligned) {
- buf->data -= sizeof(struct htx) - 9;
- buf->head = sizeof(struct htx) - 9;
- }
} while (ret > 0);
if (h2_recv_allowed(h2c) && (b_data(buf) < buf->size))