htx_xfer() function replaced htx_xfer_blks(). So let's use it.
goto out;
}
- htx_xfer_blks(buf_htx, appctx_htx, count, HTX_BLK_UNUSED);
+ htx_xfer(buf_htx, appctx_htx, count, HTX_XFER_DEFAULT);
buf_htx->flags |= (appctx_htx->flags & (HTX_FL_PARSING_ERROR|HTX_FL_PROCESSING_ERROR));
if (htx_is_empty(appctx_htx)) {
buf_htx->flags |= (appctx_htx->flags & HTX_FL_EOM);
goto end;
}
- htx_xfer_blks(appctx_htx, buf_htx, count, HTX_BLK_UNUSED);
+ htx_xfer(appctx_htx, buf_htx, count, HTX_XFER_DEFAULT);
if (htx_is_empty(buf_htx)) {
appctx_htx->flags |= (buf_htx->flags & HTX_FL_EOM);
}
htx_to_buf(htx, outbuf);
b_xfer(outbuf, &hc->req.buf, b_data(&hc->req.buf));
} else {
- struct htx_ret ret;
-
- ret = htx_xfer_blks(htx, hc_htx, htx_used_space(hc_htx), HTX_BLK_UNUSED);
- if (!ret.ret) {
+ if (!htx_xfer(htx, hc_htx, htx_used_space(hc_htx), HTX_XFER_DEFAULT)) {
applet_have_more_data(appctx);
goto out;
}
if (hc->options & HTTPCLIENT_O_RES_HTX) {
/* HTX mode transfers the header to the hc buffer */
struct htx *hc_htx;
- struct htx_ret ret;
if (!b_alloc(&hc->res.buf, DB_MUX_TX)) {
applet_wont_consume(appctx);
hc_htx = htxbuf(&hc->res.buf);
/* xfer the headers */
- ret = htx_xfer_blks(hc_htx, htx, htx_used_space(htx), HTX_BLK_EOH);
- if (!ret.ret) {
+ if (!htx_xfer(hc_htx, htx, htx_used_space(htx), HTX_XFER_HDRS_ONLY)) {
applet_need_more_data(appctx);
goto out;
}
if (hc->options & HTTPCLIENT_O_RES_HTX) {
/* HTX mode transfers the header to the hc buffer */
struct htx *hc_htx;
- struct htx_ret ret;
hc_htx = htxbuf(&hc->res.buf);
- ret = htx_xfer_blks(hc_htx, htx, htx_used_space(htx), HTX_BLK_UNUSED);
- if (!ret.ret)
+ if (!htx_xfer(hc_htx, htx, htx_used_space(htx), HTX_XFER_DEFAULT))
applet_wont_consume(appctx);
else
applet_fl_clr(appctx, APPCTX_FL_INBLK_FULL);
struct htx *h2s_htx = NULL;
struct htx *buf_htx = NULL;
struct buffer *rxbuf = NULL;
- struct htx_ret htxret;
size_t ret = 0;
uint prev_h2c_flags = h2c->flags;
unsigned long long prev_body_len = h2s->body_len;
goto end;
}
- htxret = htx_xfer_blks(buf_htx, h2s_htx, count, HTX_BLK_UNUSED);
- count -= htxret.ret;
+ count -= htx_xfer(buf_htx, h2s_htx, count, HTX_XFER_DEFAULT);
if (h2s_htx->flags & HTX_FL_PARSING_ERROR) {
buf_htx->flags |= HTX_FL_PARSING_ERROR;
goto end;
}
- htx_xfer_blks(cs_htx, qcs_htx, count, HTX_BLK_UNUSED);
+ htx_xfer(cs_htx, qcs_htx, count, HTX_XFER_DEFAULT);
BUG_ON(qcs_htx->flags & HTX_FL_PARSING_ERROR);
/* Copy EOM from src to dst buffer if all data copied. */