]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
bufix the g in dup check. identified by Xiaohui Liu
authorgnawali <gnawali>
Sun, 11 Apr 2010 23:27:30 +0000 (23:27 +0000)
committergnawali <gnawali>
Sun, 11 Apr 2010 23:27:30 +0000 (23:27 +0000)
tos/lib/net/ctp/CtpForwardingEngineP.nc

index 964e35a5ef39ef92b842769ae24534c86ac91392..379bafdbdf1a6085d5c70a727520227de95a4f42 100644 (file)
@@ -703,8 +703,8 @@ implementation {
     }
     //... and in the queue for duplicates
     if (call SendQueue.size() > 0) {
-      for (i = call SendQueue.size(); --i;) {
-       qe = call SendQueue.element(i);
+      for (i = call SendQueue.size(); i >0; i--) {
+       qe = call SendQueue.element(i-1);
        if (call CtpPacket.matchInstance(qe->msg, msg)) {
          duplicate = TRUE;
          break;
@@ -736,16 +736,12 @@ implementation {
 
   event message_t* 
   SubSnoop.receive(message_t* msg, void *payload, uint8_t len) {
-    //am_addr_t parent = call UnicastNameFreeRouting.nextHop();
-    am_addr_t proximalSrc = call AMPacket.source(msg);
-
     // Check for the pull bit (P) [TEP123] and act accordingly.  This
     // check is made for all packets, not just ones addressed to us.
     if (call CtpPacket.option(msg, CTP_OPT_PULL)) {
       call CtpInfo.triggerRouteUpdate();
     }
 
-    call CtpInfo.setNeighborCongested(proximalSrc, call CtpPacket.option(msg, CTP_OPT_ECN));
     return signal Snoop.receive[call CtpPacket.getType(msg)] 
       (msg, payload + sizeof(ctp_data_header_t), 
        len - sizeof(ctp_data_header_t));