summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/connman.h2
-rw-r--r--src/service.c19
2 files changed, 21 insertions, 0 deletions
diff --git a/src/connman.h b/src/connman.h
index 617d62a8..20018754 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -605,6 +605,8 @@ int __connman_service_set_ignore(struct connman_service *service,
connman_bool_t ignore);
void __connman_service_set_userconnect(struct connman_service *service,
connman_bool_t userconnect);
+void __connman_service_set_search_domains(struct connman_service *service,
+ char **domains);
void __connman_service_set_string(struct connman_service *service,
const char *key, const char *value);
diff --git a/src/service.c b/src/service.c
index f375c728..236879e8 100644
--- a/src/service.c
+++ b/src/service.c
@@ -4748,6 +4748,25 @@ void __connman_service_set_userconnect(struct connman_service *service,
service->userconnect = userconnect;
}
+void __connman_service_set_search_domains(struct connman_service *service,
+ char **domains)
+{
+ int index;
+
+ index = __connman_service_get_index(service);
+ if (index < 0)
+ return;
+
+ if (service->domains != NULL) {
+ remove_searchdomains(service, index, service->domains);
+ g_strfreev(service->domains);
+
+ service->domains = g_strdupv(domains);
+
+ update_nameservers(service);
+ }
+}
+
static void service_complete(struct connman_service *service)
{
reply_pending(service, EIO);