X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Flib%2Fnet%2Flqi%2FLqiForwardingEngineP.nc;h=039b5252767a364b73b62c0e967e7c4c9ea2e61e;hb=3fb48eb60377255c8ca50414ab5c815939390b30;hp=2029bb9672203d4454650d0024ebf337db6914a1;hpb=263557bb1ef96a85a9221865882b467d3bc87c77;p=tinyos-2.x.git diff --git a/tos/lib/net/lqi/LqiForwardingEngineP.nc b/tos/lib/net/lqi/LqiForwardingEngineP.nc index 2029bb96..039b5252 100644 --- a/tos/lib/net/lqi/LqiForwardingEngineP.nc +++ b/tos/lib/net/lqi/LqiForwardingEngineP.nc @@ -296,19 +296,21 @@ implementation { if (call SubSend.send(call AMPacket.destination(msg), msg, call SubPacket.payloadLength(msg)) == SUCCESS) { - dbg("LQI", "Packet not acked, retransmit:\t%s\n", fields(msg)); + dbg("LQI", "Packet not acked, retransmit @%s:\n\t%s\n", sim_time_string(), fields(msg)); call CollectionDebug.logEventMsg(NET_C_FE_SENDDONE_WAITACK, call CollectionPacket.getSequenceNumber(msg), call CollectionPacket.getOrigin(msg), call AMPacket.destination(msg)); fail_count ++; + return; } else { call CollectionDebug.logEventMsg(NET_C_FE_SENDDONE_FAIL, call CollectionPacket.getSequenceNumber(msg), call CollectionPacket.getOrigin(msg), call AMPacket.destination(msg)); - dbg("LQI", "Packet not acked, retransmit fail:\t%s\n", fields(msg)); + dbg("LQI", "Packet not acked, retransmit fail @%s:\n\t%s\n", sim_time_string(), fields(msg)); sendFailures++; + return; } } else if (fail_count >= 5) { @@ -351,19 +353,21 @@ implementation { if (call SubSendMine.send(call AMPacket.destination(msg), msg, call SubPacket.payloadLength(msg)) == SUCCESS) { - dbg("LQI", "Packet not acked, retransmit:\t%s\n", fields(msg)); + dbg("LQI", "Packet not acked, retransmit (%hhu) @%s:\n\t%s\n", fail_count, sim_time_string(), fields(msg)); call CollectionDebug.logEventMsg(NET_C_FE_SENDDONE_WAITACK, call CollectionPacket.getSequenceNumber(msg), call CollectionPacket.getOrigin(msg), call AMPacket.destination(msg)); fail_count ++; + return; } else { call CollectionDebug.logEventMsg(NET_C_FE_SENDDONE_FAIL, call CollectionPacket.getSequenceNumber(msg), call CollectionPacket.getOrigin(msg), call AMPacket.destination(msg)); - dbg("LQI", "Packet not acked, retransmit fail:\t%s\n", fields(msg)); + dbg("LQI", "Packet not acked, retransmit fail @%s:\n\t%s\n", sim_time_string(), fields(msg)); sendFailures++; + return; } } else if (fail_count >= 5) {