Bug fix: update packet attributes in queued packets in CSMA instead of doing a full packetbuf copy after transmissions. The lower layers often add their own headers to packetbuf.
This commit is contained in:
parent
6a1469aeb2
commit
e8a96dc202
3 changed files with 8 additions and 3 deletions
|
@ -244,9 +244,7 @@ packet_sent(void *ptr, int status, int num_transmissions)
|
|||
|
||||
/* This is needed to correctly attribute energy that we spent
|
||||
transmitting this packet. */
|
||||
q = list_head(queued_packet_list);
|
||||
queuebuf_free(q->buf);
|
||||
q->buf = queuebuf_new_from_packetbuf();
|
||||
queuebuf_update_attr_from_packetbuf(q->buf);
|
||||
|
||||
} else {
|
||||
PRINTF("csma: drop with status %d after %d transmissions, %d collisions\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue