]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Timeout on transmissions.
authorscipio <scipio>
Fri, 13 Apr 2007 19:38:11 +0000 (19:38 +0000)
committerscipio <scipio>
Fri, 13 Apr 2007 19:38:11 +0000 (19:38 +0000)
tos/lib/net/lqi/LqiForwardingEngineP.nc

index 2029bb9672203d4454650d0024ebf337db6914a1..039b5252767a364b73b62c0e967e7c4c9ea2e61e 100644 (file)
@@ -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) {