timeserver: Check condition to restart timeservers
authorAlok Barsode <alok.barsode@linux.intel.com>
Fri, 3 Feb 2012 18:26:03 +0000 (20:26 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Sat, 4 Feb 2012 00:15:36 +0000 (01:15 +0100)
if we are using service timeservers, then do not restart
ntp if the user modifies system timeservers.

src/timeserver.c

index b00f109..7f6a9b5 100644 (file)
@@ -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;