]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
fix logical operator bug found by Thomas Schmid
authormmaroti <mmaroti>
Thu, 10 Dec 2009 00:29:06 +0000 (00:29 +0000)
committermmaroti <mmaroti>
Thu, 10 Dec 2009 00:29:06 +0000 (00:29 +0000)
tos/lib/ftsp/TimeSyncP.nc

index 177c1dff6920e4a70ce53ef239ba29373626f5be..6a17381db172e17fc18e04081fc29f3bca3ad3e8 100644 (file)
@@ -284,7 +284,7 @@ implementation
 
         if( msg->rootID < outgoingMsg->rootID &&
             // jw: after becoming the root ignore other roots messages (in send period)
-            ~(heartBeats < IGNORE_ROOT_MSG && outgoingMsg->rootID == TOS_NODE_ID) ){
+            !(heartBeats < IGNORE_ROOT_MSG && outgoingMsg->rootID == TOS_NODE_ID) ){
             outgoingMsg->rootID = msg->rootID;
             outgoingMsg->seqNum = msg->seqNum;
         }