considered the LE header when calculating a valid payload. THis
is problematic if you receive a packet with a large footer, but
want to send a packet with a large payload: the getPayload() would
incorrectly only let you get a small payload and so return NULL.
This is probably the first instance I've seen where clear() might
have been useful....
// 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);
}