[PATCH 2/3] service: Set host and domain names when default service changes

Patrik Flykt patrik.flykt at linux.intel.com
Fri Sep 13 06:11:06 PDT 2013


---
 src/service.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/service.c b/src/service.c
index b0412ff..26d8985 100644
--- a/src/service.c
+++ b/src/service.c
@@ -1348,6 +1348,15 @@ static void default_changed(void)
 
 	current_default = service;
 
+	if (service) {
+		if (service->hostname &&
+				connman_setting_get_bool("AllowHostnameUpdates"))
+			__connman_utsname_set_hostname(service->hostname);
+
+		if (service->domainname)
+			__connman_utsname_set_domainname(service->domainname);
+	}
+
 	__connman_notifier_default_changed(service);
 }
 
-- 
1.7.10.4




More information about the connman mailing list