}
}
+ if ((htx->flags & HTX_FL_EOM) && htx_is_empty(htx))
+ qcs->flags |= QC_SF_FIN_STREAM;
+
out:
if (total) {
if (!(qcs->qcc->wait_event.events & SUB_RETRY_SEND))
}
}
+ if ((htx->flags & HTX_FL_EOM) && htx_is_empty(htx))
+ qcs->flags |= QC_SF_FIN_STREAM;
+
b_add(res, b_data(&outbuf));
if (total) {
struct qcs *qcs = container_of(node, struct qcs, by_id);
struct buffer *buf = &qcs->tx.buf;
if (b_data(buf)) {
- /* TODO handle the FIN parameter */
- ret = qcs_push_frame(qcs, buf, 0, qcs->tx.offset);
+ char fin = 0;
+
+ /* if FIN is activated, ensure the buffer to
+ * send is the last
+ */
+ if (qcs->flags & QC_SF_FIN_STREAM) {
+ BUG_ON(b_data(&qcs->tx.buf) < b_data(buf));
+ fin = (b_data(&qcs->tx.buf) - b_data(buf) == 0);
+ }
+
+ ret = qcs_push_frame(qcs, buf, fin, qcs->tx.offset);
if (ret < 0)
ABORT_NOW();