[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/collection ForwardingEngineP.nc, 1.1.2.35, 1.1.2.36

Rodrigo Fonseca rfonseca76 at users.sourceforge.net
Thu Jun 22 21:47:14 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv7925

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	ForwardingEngineP.nc 
Log Message:
Added another cache lookup to prevent duplicates

Index: ForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/Attic/ForwardingEngineP.nc,v
retrieving revision 1.1.2.35
retrieving revision 1.1.2.36
diff -C2 -d -r1.1.2.35 -r1.1.2.36
*** ForwardingEngineP.nc	22 Jun 2006 18:27:04 -0000	1.1.2.35
--- ForwardingEngineP.nc	23 Jun 2006 04:47:12 -0000	1.1.2.36
***************
*** 152,157 ****
    }
  
-   task void sendTask();
- 
    network_header_t* getHeader(message_t* m) {
      return (network_header_t*)call SubPacket.getPayload(m, NULL);
--- 152,155 ----
***************
*** 241,244 ****
--- 239,249 ----
        uint8_t payloadLen = call SubPacket.payloadLength(qe->msg);
        am_addr_t dest = call UnicastNameFreeRouting.nextHop();
+       uint32_t msg_uid = call CollectionPacket.getPacketID(qe->msg);
+       if (call SentCache.lookup(msg_uid)) {
+         call CollectionDebug.logEvent(NET_C_FE_DUPLICATE_CACHE_AT_SEND);
+         call SendQueue.dequeue();
+ 	post sendTask();
+         return;
+       }
        /* If our current parent is not the same as the last parent
  	 we sent do, then reset the count of unacked packets: don't



More information about the Tinyos-2-commits mailing list