master/master.c
branchstable-1.5
changeset 2114 b91bb9b96823
parent 2109 755e6ce823f0
child 2115 2ec1239216e5
equal deleted inserted replaced
2111:d9d56e56f2a2 2114:b91bb9b96823
  1092 
  1092 
  1093             cur_data += data_size + EC_DATAGRAM_FOOTER_SIZE;
  1093             cur_data += data_size + EC_DATAGRAM_FOOTER_SIZE;
  1094             continue;
  1094             continue;
  1095         }
  1095         }
  1096 
  1096 
  1097         // copy received data into the datagram memory
  1097         if (datagram->type != EC_DATAGRAM_APWR &&
  1098         memcpy(datagram->data, cur_data, data_size);
  1098                 datagram->type != EC_DATAGRAM_FPWR &&
       
  1099                 datagram->type != EC_DATAGRAM_BWR &&
       
  1100                 datagram->type != EC_DATAGRAM_LWR) {
       
  1101             // copy received data into the datagram memory,
       
  1102             // if something has been read
       
  1103             memcpy(datagram->data, cur_data, data_size);
       
  1104         }
  1099         cur_data += data_size;
  1105         cur_data += data_size;
  1100 
  1106 
  1101         // set the datagram's working counter
  1107         // set the datagram's working counter
  1102         datagram->working_counter = EC_READ_U16(cur_data);
  1108         datagram->working_counter = EC_READ_U16(cur_data);
  1103         cur_data += EC_DATAGRAM_FOOTER_SIZE;
  1109         cur_data += EC_DATAGRAM_FOOTER_SIZE;