diff -r 96805a6eae3d -r dd276ae226b4 master/domain.c --- a/master/domain.c Mon Apr 19 21:54:54 2010 +0200 +++ b/master/domain.c Mon Apr 19 21:56:16 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) {