LIST_APPEND(&single_frm, &frm->list);
if (qcc_send_frames(qcc, &single_frm, 0)) {
- /* replace frame that cannot be sent in qcc list. */
- LIST_DELETE(&frm->list);
- LIST_INSERT(&qcc->lfctl.frms, &frm->list);
+ if (!LIST_ISEMPTY(&single_frm)) {
+ /* replace frame that cannot be sent in qcc list. */
+ LIST_DELETE(&frm->list);
+ LIST_INSERT(&qcc->lfctl.frms, &frm->list);
+ }
goto err;
}
/* If frame is MAX_STREAM_DATA, reset corresponding QCS msd_frm pointer. */
if (id >= 0) {
- node = eb64_lookup(&qcc->streams_by_id, frm->max_stream_data.id);
+ node = eb64_lookup(&qcc->streams_by_id, id);
if (node) {
qcs = eb64_entry(node, struct qcs, by_id);
qcs->tx.msd_frm = NULL;