min-protocol/min

Review Comments

Opened this issue · 0 comments

Hi,
In function valid_frame_received(), transport_fifo_send() is called without checking if the Tx has space or not.
Probably if(ON_WIRE_SIZE(frame->payload_len) <= min_tx_space(self->port)) should also be called before calling the line transport_fifo_send during nacked message tranmission. see the below code snipshot.

            // Now retransmit the number of frames that were requested
            for(i = 0; i < num_nacked; i++) {
                struct transport_frame *retransmit_frame = &self->transport_fifo.frames[idx];
                transport_fifo_send(self, retransmit_frame);
                idx++;
                idx &= TRANSPORT_FIFO_SIZE_FRAMES_MASK;
            }