Re-ordered criteria for datagram matching.

This commit is contained in:
Florian Pose 2007-08-09 14:40:29 +00:00
parent 7ddb6848d9
commit cc0cee6757
1 changed files with 2 additions and 2 deletions

View File

@ -705,9 +705,9 @@ void ec_master_receive_datagrams(ec_master_t *master, /**< EtherCAT master */
// search for matching datagram in the queue
matched = 0;
list_for_each_entry(datagram, &master->datagram_queue, queue) {
if (datagram->state == EC_DATAGRAM_SENT
if (datagram->index == datagram_index
&& datagram->state == EC_DATAGRAM_SENT
&& datagram->type == datagram_type
&& datagram->index == datagram_index
&& datagram->data_size == data_size) {
matched = 1;
break;