]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
check if timestamp is valid before using it
authorkusy <kusy>
Tue, 17 Feb 2009 17:49:15 +0000 (17:49 +0000)
committerkusy <kusy>
Tue, 17 Feb 2009 17:49:15 +0000 (17:49 +0000)
tos/lib/ftsp/TimeSyncP.nc

index 4313f6664913ac01dd41429f55b0f93d6a59b0ce..6aed03b86a379ec579b28a6f18dc7274c122a551 100644 (file)
@@ -311,7 +311,8 @@ implementation
         if( diff < -16 || diff > 16 )
             return msg;
 #endif
-        if( (state & STATE_PROCESSING) == 0 ) {
+        if( (state & STATE_PROCESSING) == 0
+            && call TimeSyncPacket.isValid(msg)) {
             message_t* old = processedMsg;
 
             processedMsg = msg;