se_fl_set(appctx->sedesc, SE_FL_ERROR);
TRACE_STATE("report ERROR to SE", APPLET_EV_RECV|APPLET_EV_BLK, appctx);
}
+
+ if (applet_fl_test(appctx, APPCTX_FL_ERROR))
+ se_report_term_evt(appctx->sedesc, !applet_fl_test(appctx, APPCTX_FL_EOI) ? se_tevt_type_truncated_rcv_err : se_tevt_type_rcv_err);
+ else if (applet_fl_test(appctx, APPCTX_FL_EOS))
+ se_report_term_evt(appctx->sedesc, !applet_fl_test(appctx, APPCTX_FL_EOI) ? se_tevt_type_truncated_eos : se_tevt_type_eos);
}
end:
ret = appctx->applet->snd_buf(appctx, buf, count, flags);
+ if (applet_fl_test(appctx, (APPCTX_FL_ERROR|APPCTX_FL_ERR_PENDING)))
+ se_report_term_evt(appctx->sedesc, se_tevt_type_snd_err);
+
end:
if (applet_fl_test(appctx, (APPCTX_FL_ERROR|APPCTX_FL_ERR_PENDING))) {
BUG_ON((applet_fl_get(appctx) & (APPCTX_FL_EOS|APPCTX_FL_ERROR|APPCTX_FL_ERR_PENDING)) == (APPCTX_FL_EOS|APPCTX_FL_ERR_PENDING));
/* else */
/* applet_have_more_data(appctx); */
+ if (applet_fl_test(appctx, APPCTX_FL_ERROR))
+ se_report_term_evt(appctx->sedesc, !applet_fl_test(appctx, APPCTX_FL_EOI) ? se_tevt_type_truncated_rcv_err : se_tevt_type_rcv_err);
+ else if (applet_fl_test(appctx, APPCTX_FL_EOS))
+ se_report_term_evt(appctx->sedesc, !applet_fl_test(appctx, APPCTX_FL_EOI) ? se_tevt_type_truncated_eos : se_tevt_type_eos);
+
if (se_done_ff(sdo) != 0 || !(sdo->iobuf.flags & (IOBUF_FL_FF_BLOCKED|IOBUF_FL_FF_WANT_ROOM))) {
/* Something was forwarding or the consumer states it is not
* blocked anyore, don't reclaim more room */
sc->flags |= SC_FL_SHUT_DONE;
oc->flags |= CF_WRITE_EVENT;
sc_set_hcto(sc);
+ sc_report_term_evt(sc, strm_tevt_type_shutw);
/* on shutw we always wake the applet up */
appctx_wakeup(__sc_appctx(sc));
sc->flags |= SC_FL_EOS;
ic->flags |= CF_READ_EVENT;
sc_ep_report_read_activity(sc);
+ sc_report_term_evt(sc, (sc->flags & SC_FL_EOI ? strm_tevt_type_eos: strm_tevt_type_truncated_eos));
/* Note: on abort, we don't call the applet */