[Tinyos-devel] Bug in TossimActiveMessageC
Philip Levis
pal at cs.stanford.edu
Wed Jan 21 20:16:57 PST 2009
On Jan 21, 2009, at 8:02 PM, Lumir Honus wrote:
> event message_t*
> ExtReceive.receive[am_id_t id](message_t* msg, void* payload,
> uint8_t len) {
> am_id_t type = call AMPacket.type(msg);
> call TrafficDebug.logReceived(type,msg,len);
> signal Receive.receive[type](msg, payload, len);
> return msg;
> }
This is a bug. If the receive handler buffer swaps, then you ignore
the pointer passed back. In this case, the higher layer uses the
message buffer (e.g., to send a packet, and puts it in a queue) but
the underlying radio stack is using it for reception.
Phil
More information about the Tinyos-devel
mailing list