mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-30 15:30:30 +00:00
Bugfix: energy consumption for retransmissions was miscounted
This commit is contained in:
parent
af4ce9ba9e
commit
74f1754d88
@ -241,6 +241,13 @@ packet_sent(void *ptr, int status, int num_transmissions)
|
||||
PRINTF("csma: retransmitting with time %lu %p\n", time, q);
|
||||
ctimer_set(&transmit_timer, time,
|
||||
transmit_queued_packet, NULL);
|
||||
|
||||
/* 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();
|
||||
|
||||
} else {
|
||||
PRINTF("csma: drop with status %d after %d transmissions, %d collisions\n",
|
||||
status, q->transmissions, q->collisions);
|
||||
|
Loading…
Reference in New Issue
Block a user