]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Fix forwarding bug -- don't forward broadcasts.
authorscipio <scipio>
Tue, 17 Apr 2007 11:43:37 +0000 (11:43 +0000)
committerscipio <scipio>
Tue, 17 Apr 2007 11:43:37 +0000 (11:43 +0000)
tos/lib/net/lqi/LqiForwardingEngineP.nc

index 9c448bc0167be5bd481ee8abcdefd3b84751a807..d16baf6bf3c5426775c1a9b33a79f74edf826930 100644 (file)
@@ -267,11 +267,13 @@ implementation {
                                     call CollectionPacket.getSequenceNumber(msg), 
                                     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());
       return mForward(msg);