Blame SOURCES/0001-hostname-Fix-BlueZ-5.XX-adapter-name-on-startup.patch

e0630b
From cba55944f76ad0f01bb7c8976fd6699f058c68cd Mon Sep 17 00:00:00 2001
e0630b
From: Bastien Nocera <hadess@hadess.net>
e0630b
Date: Wed, 20 Sep 2017 14:42:14 +0200
e0630b
Subject: [PATCH] hostname: Fix "BlueZ 5.XX" adapter name on startup
e0630b
e0630b
The hostname plugin listens to property changes from systemd-hostnamed
e0630b
but doesn't fetch initial values. This means that unless the
e0630b
PrettyHostname or StaticHostname changes, the default adapter will be
e0630b
called "BlueZ 5.XX" matching the version number.
e0630b
e0630b
This is the case since the hostname plugin replaced the adaptername
e0630b
plugin in 2012.
e0630b
e0630b
Fetch the initial values for PrettyHostname, StaticHostname and
e0630b
Chassis when the plugin is initiated, so as to make the values
e0630b
available for adapter setup.
e0630b
---
e0630b
 plugins/hostname.c | 4 ++++
e0630b
 1 file changed, 4 insertions(+)
e0630b
e0630b
diff --git a/plugins/hostname.c b/plugins/hostname.c
e0630b
index f876d0afb..db9187378 100644
e0630b
--- a/plugins/hostname.c
e0630b
+++ b/plugins/hostname.c
e0630b
@@ -307,6 +307,10 @@ static int hostname_init(void)
e0630b
 		hostname_proxy = NULL;
e0630b
 		g_dbus_client_unref(hostname_client);
e0630b
 		hostname_client = NULL;
e0630b
+	} else {
e0630b
+		g_dbus_proxy_refresh_property(hostname_proxy, "PrettyHostname");
e0630b
+		g_dbus_proxy_refresh_property(hostname_proxy, "StaticHostname");
e0630b
+		g_dbus_proxy_refresh_property(hostname_proxy, "Chassis");
e0630b
 	}
e0630b
 
e0630b
 	return err;
e0630b
-- 
e0630b
2.14.1
e0630b