8 Star 0 Fork 12

src-anolis-os/bluez

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-hostname-Fix-BlueZ-5.XX-adapter-name-on-startup.patch 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:05 . import bluez-5.50-3.el8.src.rpm
From cba55944f76ad0f01bb7c8976fd6699f058c68cd Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Wed, 20 Sep 2017 14:42:14 +0200
Subject: [PATCH] hostname: Fix "BlueZ 5.XX" adapter name on startup
The hostname plugin listens to property changes from systemd-hostnamed
but doesn't fetch initial values. This means that unless the
PrettyHostname or StaticHostname changes, the default adapter will be
called "BlueZ 5.XX" matching the version number.
This is the case since the hostname plugin replaced the adaptername
plugin in 2012.
Fetch the initial values for PrettyHostname, StaticHostname and
Chassis when the plugin is initiated, so as to make the values
available for adapter setup.
---
plugins/hostname.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/hostname.c b/plugins/hostname.c
index f876d0afb..db9187378 100644
--- a/plugins/hostname.c
+++ b/plugins/hostname.c
@@ -307,6 +307,10 @@ static int hostname_init(void)
hostname_proxy = NULL;
g_dbus_client_unref(hostname_client);
hostname_client = NULL;
+ } else {
+ g_dbus_proxy_refresh_property(hostname_proxy, "PrettyHostname");
+ g_dbus_proxy_refresh_property(hostname_proxy, "StaticHostname");
+ g_dbus_proxy_refresh_property(hostname_proxy, "Chassis");
}
return err;
--
2.14.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/bluez.git
git@gitee.com:src-anolis-os/bluez.git
src-anolis-os
bluez
bluez
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385