From: scipio Date: Sat, 27 Oct 2007 00:09:23 +0000 (+0000) Subject: Do not consider footer when calculating whether a payload size is valid. X-Git-Tag: release_tinyos_2_1_0_0~679 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=5ff8c0e01dcf2aaca598a143ed1c3cb0cc4737a4;p=tinyos-2.x.git Do not consider footer when calculating whether a payload size is valid. --- diff --git a/tos/lib/net/le/LinkEstimatorP.nc b/tos/lib/net/le/LinkEstimatorP.nc index 43b75f70..c18e9f19 100644 --- a/tos/lib/net/le/LinkEstimatorP.nc +++ b/tos/lib/net/le/LinkEstimatorP.nc @@ -721,8 +721,7 @@ implementation { // application payload pointer is just past the link estimation header command void* Packet.getPayload(message_t* msg, uint8_t len) { linkest_header_t *hdr = getHeader(msg); - uint8_t footerLen = (hdr->flags & NUM_ENTRIES_FLAG) * sizeof(linkest_header_t); - void* payload = call SubPacket.getPayload(msg, len + footerLen); + void* payload = call SubPacket.getPayload(msg, len + sizeof(linkest_header_t)); if (payload != NULL) { payload += sizeof(linkest_header_t); }