// $Id$
-/* tab:4
+/*
* "Copyright (c) 2000-2003 The Regents of the University of California.
* All rights reserved.
*
***********************************************************************/
command error_t Send.send(message_t* pMsg, uint8_t len) {
len += sizeof(lqi_header_t);
- if (len > call Packet.maxPayloadLength()) {
+ if (len > call SubPacket.maxPayloadLength()) {
+ call Leds.led0On();
return ESIZE;
}
if (call RootControl.isRoot()) {
+ call Leds.led1On();
return FAIL;
}
call RouteSelect.initializeFields(pMsg);
if (call RouteSelect.selectRoute(pMsg, 0) != SUCCESS) {
+ call Leds.led2On();
return FAIL;
}
call PacketAcknowledgements.requestAck(pMsg);
static message_t* mForward(message_t* msg) {
message_t* newMsg = msg;
int8_t buf = get_buff();
-
+ call Leds.led2Toggle();
+
if (call RootControl.isRoot()) {
return signal Receive.receive(msg, call Packet.getPayload(msg, NULL), call Packet.payloadLength(msg));
}