mirror of
https://gitlab.com/etherlab.org/ethercat.git
synced 2026-08-23 23:28:31 +08:00
Don not copy frame data to datagram memory, if datagram type is write-only.
This commit is contained in:
+6
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user