summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/connman.h2
-rw-r--r--src/service.c15
2 files changed, 17 insertions, 0 deletions
diff --git a/src/connman.h b/src/connman.h
index 20018754..8c167981 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -655,6 +655,8 @@ void __connman_service_nameserver_add_routes(struct connman_service *service,
const char *gw);
void __connman_service_nameserver_del_routes(struct connman_service *service,
enum connman_ipconfig_type type);
+void __connman_service_set_timeservers(struct connman_service *service,
+ char **timeservers);
int __connman_service_timeserver_append(struct connman_service *service,
const char *timeserver);
int __connman_service_timeserver_remove(struct connman_service *service,
diff --git a/src/service.c b/src/service.c
index 236879e8..36cc3c8a 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2521,6 +2521,21 @@ const char *connman_service_get_proxy_autoconfig(struct connman_service *service
return NULL;
}
+void __connman_service_set_timeservers(struct connman_service *service,
+ char **timeservers)
+{
+ int i;
+
+ if (service == NULL)
+ return;
+
+ g_strfreev(service->timeservers);
+ service->timeservers = NULL;
+
+ for (i = 0; timeservers != NULL && timeservers[i] != NULL; i++)
+ __connman_service_timeserver_append(service, timeservers[i]);
+}
+
int __connman_service_timeserver_append(struct connman_service *service,
const char *timeserver)
{