CLA: RX: Prevent infinite loop in buffer_read

Sometimes the parser does not read any data and goes into the error
state. In this case we get an infinite loop as `buffer_read` resets the
parsers but does not hand back control to the caller.

Signed-off-by: Felix Walter <felix.walter@d3tn.com>
This commit is contained in:
Felix Walter 2022-12-22 15:21:04 +01:00
parent e16ec4c579
commit 40d685ad3e

View file

@ -163,6 +163,7 @@ static uint8_t *buffer_read(struct cla_link *link, uint8_t *stream)
link->config->vtable->cla_rx_task_reset_parsers(
link
);
break;
} else if (HAS_FLAG(rx_data->cur_parser->flags,
PARSER_FLAG_BULK_READ)) {
/* Bulk read requested - not handled by us. */