summaryrefslogtreecommitdiff
path: root/src/timeserver.c
diff options
context:
space:
mode:
authorAlok Barsode <alok.barsode@linux.intel.com>2012-04-05 13:20:19 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-04-05 18:56:08 +0300
commitbf56d0b3a098181c58eae1e549bd2430fa958015 (patch)
tree87b65f5fd1b364c31c86df29ba32bff82e3198b4 /src/timeserver.c
parent447256cd6424680afb92d633ba4ee60e84c6cb77 (diff)
downloadconnman-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.c7
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 */