[Patch v2 09/12] timeserver: Check condition to restart timeservers

Alok Barsode alokbarsode at gmail.com
Fri Feb 3 10:26:03 PST 2012


From: Alok Barsode <alok.barsode at linux.intel.com>

if we are using service timeservers, then do not restart
ntp if the user modifies system timeservers.
---
 src/timeserver.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/timeserver.c b/src/timeserver.c
index b00f109..7f6a9b5 100644
--- a/src/timeserver.c
+++ b/src/timeserver.c
@@ -198,6 +198,10 @@ int connman_timeserver_remove(const char *server)
 /* Restart NTP procedure */
 static void connman_timeserver_restart()
 {
+	/* If service timeservers are in use, dont restart ntp */
+	if (timeservers != NULL)
+		return;
+
 	if (resolv == NULL) {
 		DBG("No online service.");
 		return;
-- 
1.7.5.4




More information about the connman mailing list