BUGFIX: Remove SDO configurations when leaving OPERATION mode.
--- a/master/slave.c Fri Oct 27 15:01:32 2006 +0000
+++ b/master/slave.c Fri Oct 27 15:04:12 2006 +0000
@@ -283,7 +283,17 @@
void ec_slave_reset(ec_slave_t *slave /**< EtherCAT slave */)
{
+ ec_sdo_data_t *sdodata, *next_sdodata;
+
+ // remove FMMU configurations
slave->fmmu_count = 0;
+
+ // free all SDO configurations
+ list_for_each_entry_safe(sdodata, next_sdodata, &slave->sdo_confs, list) {
+ list_del(&sdodata->list);
+ kfree(sdodata->data);
+ kfree(sdodata);
+ }
}
/*****************************************************************************/