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

Rodrigo Fonseca rfonseca76 at users.sourceforge.net
Thu Jun 15 09:44:48 PDT 2006


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

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	ForwardingEngineP.nc 
Log Message:
Fix length handling bug

Index: ForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/collection/Attic/ForwardingEngineP.nc,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -C2 -d -r1.1.2.18 -r1.1.2.19
*** ForwardingEngineP.nc	14 Jun 2006 21:52:56 -0000	1.1.2.18
--- ForwardingEngineP.nc	15 Jun 2006 16:44:46 -0000	1.1.2.19
***************
*** 152,156 ****
      if (!running) {return EOFF;}
      
!     call Packet.setPayloadLength(msg, len + sizeof(network_header_t));
      hdr = getHeader(msg);
      hdr->origin = TOS_NODE_ID;
--- 152,156 ----
      if (!running) {return EOFF;}
      
!     call Packet.setPayloadLength(msg, len);
      hdr = getHeader(msg);
      hdr->origin = TOS_NODE_ID;
***************
*** 354,363 ****
        message_t* newMsg = call MessagePool.get();
        fe_queue_entry_t *qe = call QEntryPool.get();
-       uint8_t len = call SubPacket.payloadLength(m);
  
        qe->msg = m;
        qe->client = 0xff;
        
-       call Packet.setPayloadLength(m, len + sizeof(network_header_t));
        if (call SendQueue.enqueue(qe) == SUCCESS) {
  	dbg("Forwarder,Route", "%s forwarding packet %p with queue size %hhu\n", __FUNCTION__, m, call SendQueue.size());
--- 354,361 ----



More information about the Tinyos-2-commits mailing list