In mux-h2 and mux-quic we still had two places manually setting
SE_FL_ERR_PENDING or SE_FL_ERROR depending on the EOS state, instead
of using se_fl_set_error() which takes care of the condition. Better
use the specialized function for this, it will allow to centralize
the conditions. Note that this will be needed to fix a bug.
!b_data(&h2s->h2c->dbuf) &&
(h2s->flags & (H2_SF_BLK_SFCTL | H2_SF_BLK_MFCTL))) {
TRACE_DEVEL("fctl with shutr, reporting error to app-layer", H2_EV_H2S_SEND|H2_EV_STRM_SEND|H2_EV_STRM_ERR, h2s->h2c->conn, h2s);
- if (se_fl_test(h2s->sd, SE_FL_EOS))
- se_fl_set(h2s->sd, SE_FL_ERROR);
- else
- se_fl_set(h2s->sd, SE_FL_ERR_PENDING);
+ se_fl_set_error(h2s->sd);
}
if (total > 0 && !(h2s->flags & H2_SF_BLK_SFCTL) &&
continue;
if (qcc->conn->flags & CO_FL_ERROR) {
- se_fl_set(qcs->sd, SE_FL_ERR_PENDING);
- if (se_fl_test(qcs->sd, SE_FL_EOS))
- se_fl_set(qcs->sd, SE_FL_ERROR);
-
+ se_fl_set_error(qcs->sd);
qcs_alert(qcs);
}
}