Hi Patrik and list
> On Thu, 2014-04-03 at 15:35 +0200, Tim Sander wrote:
> > I currently have a connman 1.22 set up with time TimeUpdates set to
> > manual. This is due to the fact that i use ntpd for time
> > synchronisation due to the better accuracy. If connman now is set to
> > dhcp i have a hard time determining the timeserver. This information
> > does not seem to be available in the connman dbus interface?
> 
> When TimeUpdates are set to manual, no NTP information is available. It
> is expected that the user takes care of all timeserver setting in this
> case.
Well how should that be done if the DHCP Information is nowhere availabe. I 
guess NTP Timeservers is a common Information delivered via dhcp.

The following patch should disable the ntp functionality but still display the 
information in the normal locations. I have this gut feeling that this patch 
might not be acceptable for mainline. As its not clear if the ntp server is 
active or not. But it would be nice to have the DHCP information exposed on 
the DBUS somewhere.

Best regards
Tim

--- connman-1.22/src/timeserver.c.orig  2014-04-04 12:09:27.650024757 +0200
+++ connman-1.22/src/timeserver.c       2014-04-04 12:15:38.324309664 +0200
@@ -187,9 +187,6 @@
        char **fallback_ts;
        int index, i;
 
-       if (__connman_clock_timeupdates() == TIME_UPDATES_MANUAL)
-               return NULL;
-
        service_ts_config = connman_service_get_timeservers_config(service);
 
        /* First add Service Timeservers.Configuration to the list */
@@ -366,8 +363,9 @@
        if (getenv("CONNMAN_RESOLV_DEBUG"))
                g_resolv_set_debug(resolv, resolv_debug, "RESOLV");
 
-       for (i = 0; nameservers[i]; i++)
-               g_resolv_add_nameserver(resolv, nameservers[i], 53, 0);
+       if (__connman_clock_timeupdates() != TIME_UPDATES_MANUAL)
+               for (i = 0; nameservers[i]; i++)
+                       g_resolv_add_nameserver(resolv, nameservers[i], 53, 
0);
 
        g_strfreev(nameservers);
 

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to