From: Daniel Wagner <daniel.wag...@bmw-carit.de>

---
 src/connman.h |    5 +++++
 src/service.c |   21 +++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/connman.h b/src/connman.h
index 1140664..75edee0 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -275,6 +275,11 @@ int __connman_ipconfig_set_proxy_autoconfig(struct 
connman_ipconfig *ipconfig,
                                                        const char *url);
 const char *__connman_ipconfig_get_proxy_autoconfig(struct connman_ipconfig 
*ipconfig);
 
+void __connman_service_timeserver_append(struct connman_service *service,
+                                               const char *timeserver);
+void __connman_service_timeserver_remove(struct connman_service *service,
+                                               const char *timeserver);
+
 int __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
                GKeyFile *keyfile, const char *identifier, const char *prefix);
 int __connman_ipconfig_save(struct connman_ipconfig *ipconfig,
diff --git a/src/service.c b/src/service.c
index 04555bc..f6555d4 100644
--- a/src/service.c
+++ b/src/service.c
@@ -87,6 +87,7 @@ struct connman_service {
        char **nameservers_config;
        char **domains;
        char *domainname;
+       char *timeserver;
        /* 802.1x settings from the config files */
        char *eap;
        char *identity;
@@ -1763,6 +1764,26 @@ const char *connman_service_get_proxy_autoconfig(struct 
connman_service *service
        return NULL;
 }
 
+void __connman_service_timeserver_append(struct connman_service *service,
+                                               const char *timeserver)
+{
+       if (timeserver == NULL)
+               return;
+
+       g_free(service->timeserver);
+       service->timeserver = g_strdup(timeserver);
+}
+
+void __connman_service_timeserver_remove(struct connman_service *service,
+                                               const char *timeserver)
+{
+       if (timeserver == NULL)
+               return;
+
+       g_free(service->timeserver);
+       service->timeserver = NULL;
+}
+
 void __connman_service_set_passphrase(struct connman_service *service,
                                        const char* passphrase)
 {
-- 
1.7.4

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to