}
/* Move forward <strm> STREAM frame by <data> bytes. */
-static inline void qc_stream_frm_mv_fwd(struct quic_stream *strm, uint64_t data)
+static inline void qc_stream_frm_mv_fwd(struct quic_frame *frm, uint64_t data)
{
+ struct quic_stream *strm = &frm->stream;
struct buffer cf_buf;
+ /* Set offset bit if not already there. */
strm->offset.key += data;
+ frm->type |= QUIC_STREAM_FRAME_TYPE_OFF_BIT;
+
strm->len -= data;
cf_buf = b_make(b_orig(strm->buf),
b_size(strm->buf),
else if (strm_frm->offset.key < stream_desc->ack_offset) {
uint64_t diff = stream_desc->ack_offset - strm_frm->offset.key;
- qc_stream_frm_mv_fwd(strm_frm, diff);
+ qc_stream_frm_mv_fwd(frm, diff);
TRACE_DEVEL("updated partially acked frame",
QUIC_EV_CONN_PRSAFRM, qc, frm);
}
else if (strm_frm->offset.key < stream_desc->ack_offset) {
uint64_t diff = stream_desc->ack_offset - strm_frm->offset.key;
- qc_stream_frm_mv_fwd(strm_frm, diff);
+ qc_stream_frm_mv_fwd(frm, diff);
TRACE_DEVEL("updated partially acked frame",
QUIC_EV_CONN_PRSAFRM, qc, frm);
}
else if (strm->offset.key < stream_desc->ack_offset) {
uint64_t diff = stream_desc->ack_offset - strm->offset.key;
- qc_stream_frm_mv_fwd(strm, diff);
+ qc_stream_frm_mv_fwd(cf, diff);
TRACE_DEVEL("updated partially acked frame",
QUIC_EV_CONN_PRSAFRM, qc, cf);
}