Only send ACK if it was possible to allocate a queuebuf to hold the data packet.
This commit is contained in:
parent
4d35b905d3
commit
df33cb6e16
|
@ -34,7 +34,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: runicast.c,v 1.1 2008/07/03 21:52:25 adamdunkels Exp $
|
||||
* $Id: runicast.c,v 1.2 2008/07/07 23:27:57 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -146,7 +146,7 @@ recv_from_stunicast(struct stunicast_conn *stunicast, rimeaddr_t *from)
|
|||
/* rimebuf_hdrreduce(sizeof(struct runicast_hdr));*/
|
||||
|
||||
q = queuebuf_new_from_rimebuf();
|
||||
|
||||
if(q != NULL) {
|
||||
PRINTF("%d.%d: runicast: Sending ACK to %d.%d for %d\n",
|
||||
rimeaddr_node_addr.u8[0],rimeaddr_node_addr.u8[1],
|
||||
from->u8[0], from->u8[1],
|
||||
|
@ -163,7 +163,7 @@ recv_from_stunicast(struct stunicast_conn *stunicast, rimeaddr_t *from)
|
|||
|
||||
queuebuf_to_rimebuf(q);
|
||||
queuebuf_free(q);
|
||||
|
||||
}
|
||||
if(c->u->recv != NULL) {
|
||||
c->u->recv(c, from, packet_seqno);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue