Don not copy frame data to datagram memory, if datagram type is write-only.

This commit is contained in:
Florian Pose 2011-09-16 12:44:54 +02:00
parent 95abe81029
commit e3ac1ec003
1 changed files with 6 additions and 2 deletions

View File

@ -1172,8 +1172,12 @@ void ec_master_receive_datagrams(
domain_data += domain_fmmu->data_size;
i++;
}
} else {
// copy received data into the datagram memory
} else if (datagram->type != EC_DATAGRAM_APWR &&
datagram->type != EC_DATAGRAM_FPWR &&
datagram->type != EC_DATAGRAM_BWR &&
datagram->type != EC_DATAGRAM_LWR) {
// copy received data into the datagram memory,
// if something has been read
memcpy(datagram->data, frame_datagram_data, data_size);
}