mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-18 17:17:23 +08:00
Improved error message
This commit is contained in:
@@ -806,6 +806,13 @@ void ec_fsm_foe_state_data_read(
|
||||
return;
|
||||
}
|
||||
|
||||
if (rec_size < EC_FOE_HEADER_SIZE) {
|
||||
EC_SLAVE_ERR(slave, "Received corrupted FoE size (%zu bytes)!\n",
|
||||
rec_size);
|
||||
ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
rec_size -= EC_FOE_HEADER_SIZE;
|
||||
|
||||
if (fsm->rx_buffer_size >= fsm->rx_buffer_offset + rec_size) {
|
||||
|
||||
Reference in New Issue
Block a user