From 2f26f3fc5ca50c2d05a3dabdd3a2058c2625f80e Mon Sep 17 00:00:00 2001
From: Ruud Overeem <overeem@astron.nl>
Date: Wed, 21 Feb 2007 14:03:05 +0000
Subject: [PATCH] BugID: 1000 Don't change clock when PVSS clock is the same as
 our internal clock-var.

---
 .../src/DigitalBoardControl/DigitalBoardControl.cc       | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc
index d2c41b80855..8beccb2a0ac 100644
--- a/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc
+++ b/MAC/APL/StationCU/src/DigitalBoardControl/DigitalBoardControl.cc
@@ -191,9 +191,12 @@ void DigitalBoardControl::handlePropertySetAnswer(GCFEvent& answer)
 		}
 
 		if (strstr(pPropAnswer->pPropName, PN_SC_CLOCK) != 0) {
-			itsClock =(static_cast<const GCFPVInteger*>(pPropAnswer->pValue))->getValue();
-			LOG_DEBUG_STR("Received clock change from PVSS, clock is now " << itsClock);
-			sendClockSetting();
+			int		newClock = (static_cast<const GCFPVInteger*>(pPropAnswer->pValue))->getValue();
+			if (newClock != itsClock) {
+				itsClock = newClock;
+				LOG_DEBUG_STR("Received clock change from PVSS, clock is now " << itsClock);
+				sendClockSetting();
+			}
 			break;
 		}
 		LOG_WARN_STR("Got VCHANGEMSG signal from unknown property " << 
-- 
GitLab