diff options
author | Alok Barsode <alok.barsode@linux.intel.com> | 2012-04-05 13:20:19 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-04-05 18:56:08 +0300 |
commit | bf56d0b3a098181c58eae1e549bd2430fa958015 (patch) | |
tree | 87b65f5fd1b364c31c86df29ba32bff82e3198b4 /src/timeserver.c | |
parent | 447256cd6424680afb92d633ba4ee60e84c6cb77 (diff) | |
download | connman-bf56d0b3a098181c58eae1e549bd2430fa958015.tar.gz connman-bf56d0b3a098181c58eae1e549bd2430fa958015.tar.bz2 connman-bf56d0b3a098181c58eae1e549bd2430fa958015.zip |
timeserver: Add Timeservers.Configuration to timeserver list
Add Timeservers.Configuration timerservers (if any) to the list of
timeservers for time correction query. Now the Order is
Timeserver.Config (via the user), service timeserver (via DHCP).
default gateway (system), global timeservers (via the user).
Diffstat (limited to 'src/timeserver.c')
-rw-r--r-- | src/timeserver.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/timeserver.c b/src/timeserver.c index 9202df89..2558d994 100644 --- a/src/timeserver.c +++ b/src/timeserver.c @@ -170,6 +170,7 @@ int __connman_timeserver_sync(struct connman_service *default_service) struct connman_network *network; char **timeservers; char **service_ts; + char **service_ts_config; const char *service_gw; int index, i; @@ -198,6 +199,12 @@ int __connman_timeserver_sync(struct connman_service *default_service) ts_list = NULL; } + service_ts_config = connman_service_get_timeservers_config(service); + + /* First add Service Timeservers.Configuration to the list */ + for (i=0; service_ts_config != NULL && service_ts_config[i] != NULL; i++) + ts_list = g_slist_prepend(ts_list, g_strdup(service_ts_config[i])); + service_ts = connman_service_get_timeservers(service); /* First add Service Timeservers via DHCP to the list */ |