--- a/master/domain.c Fri Mar 19 13:27:08 2010 +0100
+++ b/master/domain.c Thu Apr 29 14:05:15 2010 +0200
@@ -226,10 +226,13 @@
datagram_count = 0;
datagram_used[EC_DIR_OUTPUT] = 0;
datagram_used[EC_DIR_INPUT] = 0;
+
list_for_each_entry(fmmu_temp, &domain->fmmu_configs, list) {
- ec_slave_config_t *sc = (ec_slave_config_t *)fmmu_temp->sc; // we have to remove the constness, sorry
- sc->used_for_fmmu_datagram[fmmu_temp->dir] = 0;
- }
+ // we have to remove the constness, sorry FIXME
+ ec_slave_config_t *sc = (ec_slave_config_t *) fmmu_temp->sc;
+ sc->used_for_fmmu_datagram[fmmu_temp->dir] = 0;
+ }
+
list_for_each_entry(fmmu, &domain->fmmu_configs, list) {
// Correct logical FMMU address
fmmu->logical_start_address += base_address;
@@ -241,6 +244,7 @@
datagram_used[fmmu->dir]++;
sc->used_for_fmmu_datagram[fmmu->dir] = 1;
}
+
// If the current FMMU's data do not fit in the current datagram,
// allocate a new one.
if (datagram_size + fmmu->data_size > EC_MAX_DATA_SIZE) {