From 54d0ab54d6a8e3b5eb563efc5587982dc4dabf4d Mon Sep 17 00:00:00 2001 From: mmaroti Date: Thu, 10 Dec 2009 00:29:06 +0000 Subject: [PATCH] fix logical operator bug found by Thomas Schmid --- tos/lib/ftsp/TimeSyncP.nc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.2