Prior to this patch, qcc_io_recv() stream decoding loop was interrupted
on the first decoding error or if incomplete data could not be parsed.
This patch adjusts this part so that loop is stopped only on a
connection level error. In case of a stream level error or on incomplete
data, decoding continues on the next QCS entry.
Without this patch, there is a risk that a QCS decode is not performed
as expected, with a possible client timeout firing. This is pretty
unlikely though. However this patch is still necessary to remove
completely this possibility.
This should be backported up to 3.2.
qcc_qmux_recv(qcc);
}
+ next_recv:
while (!LIST_ISEMPTY(&qcc->recv_list)) {
qcs = LIST_ELEM(qcc->recv_list.n, struct qcs *, el_recv);
/* No need to add an uni local stream in recv_list. */
ret = qcc_decode_qcs(qcc, qcs);
if (ret <= 0) {
LIST_DEL_INIT(&qcs->el_recv);
- goto done;
+ /* Interrupt all receive if connection on error. */
+ if (qcc->flags & QC_CF_ERRL)
+ goto done;
+ /* Decode next entry if stream on error. */
+ goto next_recv;
}
total += ret;