[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/net/lqi LqiForwardingEngineP.nc, 1.6, 1.7

Phil Levis scipio at users.sourceforge.net
Tue Apr 17 04:43:40 PDT 2007


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

Modified Files:
	LqiForwardingEngineP.nc 
Log Message:
Fix forwarding bug -- don't forward broadcasts.


Index: LqiForwardingEngineP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/net/lqi/LqiForwardingEngineP.nc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** LqiForwardingEngineP.nc	14 Apr 2007 00:40:59 -0000	1.6
--- LqiForwardingEngineP.nc	17 Apr 2007 11:43:37 -0000	1.7
***************
*** 268,276 ****
  				     call CollectionPacket.getOrigin(msg), 
  				     call AMPacket.destination(msg));
- 
      if (call RootControl.isRoot()) {
        dbg("LQI,LQIDeliver", "LQI Root is receiving packet from node %hu @%s\n", getHeader(msg)->originaddr, sim_time_string());
        return signal Receive.receive[id](msg, payload, len);
      }
      else if (signal Intercept.forward[id](msg, payload, len)) {
        dbg("LQI,LQIDeliver", "LQI fwd is forwarding packet from node %hu @%s\n", getHeader(msg)->originaddr, sim_time_string());
--- 268,278 ----
  				     call CollectionPacket.getOrigin(msg), 
  				     call AMPacket.destination(msg));
      if (call RootControl.isRoot()) {
        dbg("LQI,LQIDeliver", "LQI Root is receiving packet from node %hu @%s\n", getHeader(msg)->originaddr, sim_time_string());
        return signal Receive.receive[id](msg, payload, len);
      }
+     else if (call AMPacket.destination(msg) != AMPacket.address()) {
+       return msg;
+     }
      else if (signal Intercept.forward[id](msg, payload, len)) {
        dbg("LQI,LQIDeliver", "LQI fwd is forwarding packet from node %hu @%s\n", getHeader(msg)->originaddr, sim_time_string());



More information about the Tinyos-2-commits mailing list