From 63e40d195e65382890178cd155cbb3a653bcadd1 Mon Sep 17 00:00:00 2001 From: Niclas Finne Date: Tue, 15 Nov 2011 16:59:12 +0100 Subject: [PATCH] Restore packetbuf before mac callback (earlier commit was accidental reverted) --- core/net/mac/contikimac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/net/mac/contikimac.c b/core/net/mac/contikimac.c index c8824dec1..c8a603ad0 100644 --- a/core/net/mac/contikimac.c +++ b/core/net/mac/contikimac.c @@ -817,11 +817,12 @@ qsend_list(mac_callback_t sent, void *ptr, struct rdc_buf_list *buf_list) struct rdc_buf_list *next; int ret; if(curr == NULL) { - mac_call_sent_callback(sent, ptr, MAC_TX_ERR, 1); return; } /* Do not send during reception of a burst */ if(we_are_receiving_burst) { + /* Prepare the packetbuf for callback */ + queuebuf_to_packetbuf(curr->buf); /* Return COLLISION so the MAC may try again later */ mac_call_sent_callback(sent, ptr, MAC_TX_COLLISION, 1); return;