From: mmaroti Date: Thu, 10 Dec 2009 00:29:06 +0000 (+0000) Subject: fix logical operator bug found by Thomas Schmid X-Git-Tag: rc_6_tinyos_2_1_1~104 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=54d0ab54d6a8e3b5eb563efc5587982dc4dabf4d;p=tinyos-2.x.git fix logical operator bug found by Thomas Schmid --- diff --git a/tos/lib/ftsp/TimeSyncP.nc b/tos/lib/ftsp/TimeSyncP.nc index 177c1dff..6a17381d 100644 --- a/tos/lib/ftsp/TimeSyncP.nc +++ b/tos/lib/ftsp/TimeSyncP.nc @@ -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; }