Allow CoE OD List Segments to have 6 bytes instead of 8.
--- a/master/fsm_coe.c Wed Jan 04 18:05:38 2012 +0100
+++ b/master/fsm_coe.c Thu Jan 05 16:47:23 2012 +0100
@@ -507,16 +507,16 @@
return;
}
- if (rec_size < 8 || rec_size % 2) {
- EC_SLAVE_ERR(slave, "Invalid data size %zu!\n", rec_size);
- ec_print_data(data, rec_size);
- fsm->state = ec_fsm_coe_error;
- return;
- }
-
first_segment = list_empty(&slave->sdo_dictionary) ? true : false;
index_list_offset = first_segment ? 8 : 6;
+ if (rec_size < index_list_offset || rec_size % 2) {
+ EC_SLAVE_ERR(slave, "Invalid data size %zu !\n", rec_size);
+ ec_print_data(data, rec_size);
+ fsm->state = ec_fsm_coe_error;
+ return;
+ }
+
sdo_count = (rec_size - index_list_offset) / 2;
for (i = 0; i < sdo_count; i++) {