[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/ctp CtpForwardingEngineP.nc, 1.1.2.2, 1.1.2.3

Kyle Jamieson kasj78 at users.sourceforge.net
Tue Aug 29 07:05:39 PDT 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	CtpForwardingEngineP.nc 
Log Message:
Initialize and update THL field.

Index: CtpForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/ctp/Attic/CtpForwardingEngineP.nc,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** CtpForwardingEngineP.nc	25 Aug 2006 00:41:28 -0000	1.1.2.2
--- CtpForwardingEngineP.nc	29 Aug 2006 14:05:37 -0000	1.1.2.3
***************
*** 298,301 ****
--- 298,302 ----
      hdr->originSeqNo  = seqno++;
      hdr->type = call CollectionId.fetch[client]();
+     hdr->thl = 0;
  
      if (clientPtrs[client] == NULL) {
***************
*** 678,682 ****
      bool duplicate = FALSE;
      fe_queue_entry_t* qe;
!     uint8_t i;
  
  
--- 679,683 ----
      bool duplicate = FALSE;
      fe_queue_entry_t* qe;
!     uint8_t i, thl;
  
  
***************
*** 684,687 ****
--- 685,694 ----
      collectid = call CtpPacket.getType(msg);
  
+     // Update the THL here, since it has lived another hop, and so
+     // that the root sees the correct THL.
+     thl = call CtpPacket.getThl(msg);
+     thl++;
+     call CtpPacket.setThl(msg, thl);
+ 
      call CollectionDebug.logEventMsg(NET_C_FE_RCV_MSG,
  					 call CollectionPacket.getSequenceNumber(msg), 



More information about the Tinyos-2-commits mailing list