unsigned short last_read; /* 16 lower bits of last read date (max pause=65s) */
unsigned char xfer_large; /* number of consecutive large xfers */
unsigned char xfer_small; /* number of consecutive small xfers */
- unsigned long long total; /* total data read */
int analyse_exp; /* expiration date for current analysers (if set) */
};
chn->to_forward = 0;
chn->last_read = now_ms;
chn->xfer_small = chn->xfer_large = 0;
- chn->total = 0;
chn->analysers = 0;
chn->flags = 0;
chn->output = 0;
c_adv(chn, fwd);
}
/* notify that some data was read */
- chn->total += len;
chn->flags |= CF_READ_EVENT;
}
oc, oc->flags, tick_isset(oc->analyse_exp) ? TICKS_TO_MS(oc->analyse_exp - now_ms) : TICK_ETERNITY);
}
else {
- chunk_appendf(&trace_buf, " ic=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .tot=%llu .to_fwd=%u)",
+ chunk_appendf(&trace_buf, " ic=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .to_fwd=%u)",
ic, ic->flags, ic->analysers, ic->analyse_exp,
- (long)ic->output, ic->total, ic->to_forward);
- chunk_appendf(&trace_buf, " oc=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .tot=%llu .to_fwd=%u)",
+ (long)ic->output, ic->to_forward);
+ chunk_appendf(&trace_buf, " oc=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .to_fwd=%u)",
oc, oc->flags, oc->analysers, oc->analyse_exp,
- (long)oc->output, oc->total, oc->to_forward);
+ (long)oc->output, oc->to_forward);
}
if (src->verbosity == STRM_VERB_SIMPLE ||
sc_ep_fwd_kip(sco, sc);
- input = ic->total;
+ input = applet_output_data(app);
output = co_data(oc);
app->applet->fct(app);
sc_have_room(sco);
}
- input = ic->total - input;
+ input = applet_output_data(app) - input;
if (input) {
channel_check_xfer(ic, input);
sc_ep_report_read_activity(sc);
memcpy(co_tail(chn), msg, len);
b_add(&chn->buf, len);
c_adv(chn, len);
- chn->total += len;
return -1;
}
c_adv(chn, 1);
}
- chn->total++;
return 1;
}
if (do_log &&
!(s->flags & SF_MONITOR) &&
- (!(fe->options & PR_O_NULLNOLOG) || s->req.total)) {
+ (!(fe->options & PR_O_NULLNOLOG) || s->scf->bytes_in)) {
s->do_log(s, log_orig(LOG_ORIG_TXN_CLOSE, LOG_ORIG_FL_NONE));
}
BUG_ON(!htx_buf);
htx = htx_from_buf(htx_buf);
- if (htx_is_empty(htx) && !strm->res.total) {
+ if (htx_is_empty(htx) && !strm->scb->bytes_in) {
/* First data transfer, add HTX response start-line first. */
sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags,
ist("HTTP/1.0"), ist("200"), ist(""));
stream_choose_redispatch(s);
res->to_forward = 0;
res->analyse_exp = TICK_ETERNITY;
- res->total = 0;
s->scb->flags &= ~(SC_FL_ERROR|SC_FL_SHUT_DONE|SC_FL_SHUT_WANTED);
if (sc_reset_endp(s->scb) < 0) {
data = htx->data - co_data(res);
c_adv(res, data);
htx->first = -1;
- res->total += data;
return 1;
}
if (ic->to_forward != CHN_INFINITE_FORWARD)
ic->to_forward -= ret;
sc->bytes_in += ret;
- ic->total += ret;
cur_read += ret;
ic->flags |= CF_READ_EVENT;
}
ic->flags |= CF_READ_EVENT;
sc->bytes_in += ret;
- ic->total += ret;
/* End-of-input reached, we can leave. In this case, it is
* important to break the loop to not block the SC because of
if (ic->to_forward != CHN_INFINITE_FORWARD)
ic->to_forward -= ret;
sc->bytes_in += ret;
- ic->total += ret;
cur_read += ret;
ic->flags |= CF_READ_EVENT;
}
ic->flags |= CF_READ_EVENT;
sc->bytes_in += ret;
- ic->total += ret;
/* End-of-input reached, we can leave. In this case, it is
* important to break the loop to not block the SC because of
res, res->flags, tick_isset(res->analyse_exp) ? TICKS_TO_MS(res->analyse_exp - now_ms) : TICK_ETERNITY);
}
else {
- chunk_appendf(&trace_buf, " req=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .tot=%llu .to_fwd=%u)",
+ chunk_appendf(&trace_buf, " req=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .to_fwd=%u)",
req, req->flags, req->analysers, req->analyse_exp,
- (long)req->output, req->total, req->to_forward);
- chunk_appendf(&trace_buf, " res=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .tot=%llu .to_fwd=%u)",
+ (long)req->output, req->to_forward);
+ chunk_appendf(&trace_buf, " res=(%p .fl=0x%08x .ana=0x%08x .exp=%u .o=%lu .to_fwd=%u)",
res, res->flags, res->analysers, res->analyse_exp,
- (long)res->output, res->total, res->to_forward);
+ (long)res->output, res->to_forward);
}
if (src->verbosity == STRM_VERB_SIMPLE ||
*/
s->req.buf = *input;
*input = BUF_NULL;
- s->req.total = (IS_HTX_STRM(s) ? htxbuf(&s->req.buf)->data : b_data(&s->req.buf));
s->scf->bytes_in = (IS_HTX_STRM(s) ? htxbuf(&s->req.buf)->data : b_data(&s->req.buf));
sc_ep_report_read_activity(s->scf);
}
*/
s->req.buf = *input;
*input = BUF_NULL;
- s->req.total = (IS_HTX_STRM(s) ? htxbuf(&s->req.buf)->data : b_data(&s->req.buf));
s->scf->bytes_in = (IS_HTX_STRM(s) ? htxbuf(&s->req.buf)->data : b_data(&s->req.buf));
sc_ep_report_read_activity(s->scf);
}
sc_conn_commit_endp_upgrade(sc);
s->req.flags &= ~(CF_READ_EVENT|CF_AUTO_CONNECT);
- s->req.total = 0;
s->flags |= SF_IGNORE;
if (sc_ep_test(sc, SE_FL_DETACHED)) {
/* If stream connector is detached, it means it was not
if (do_log &&
!(s->flags & SF_MONITOR) &&
- (!(sess->fe->options & PR_O_NULLNOLOG) || req->total)) {
+ (!(sess->fe->options & PR_O_NULLNOLOG) || s->scf->bytes_in)) {
/* we may need to know the position in the queue */
pendconn_free(s);
}
chunk_appendf(buf,
- "%s req=%p (f=0x%06x an=0x%x tofwd=%d total=%lld)\n"
+ "%s req=%p (f=0x%06x an=0x%x tofwd=%d)\n"
"%s an_exp=%s buf=%p data=%p o=%u p=%u i=%u size=%u\n",
pfx,
&strm->req,
strm->req.flags, strm->req.analysers,
- strm->req.to_forward, strm->req.total,
+ strm->req.to_forward,
pfx,
strm->req.analyse_exp ?
human_time(TICKS_TO_MS(strm->req.analyse_exp - now_ms),
}
chunk_appendf(buf,
- "%s res=%p (f=0x%06x an=0x%x tofwd=%d total=%lld)\n"
+ "%s res=%p (f=0x%06x an=0x%x tofwd=%d)\n"
"%s an_exp=%s buf=%p data=%p o=%u p=%u i=%u size=%u\n",
pfx,
&strm->res,
strm->res.flags, strm->res.analysers,
- strm->res.to_forward, strm->res.total,
+ strm->res.to_forward,
pfx,
strm->res.analyse_exp ?
human_time(TICKS_TO_MS(strm->res.analyse_exp - now_ms),