forked from pool/bluez
Accepting request 575485 from home:seife:testing
add 0001-core-Fixes-order-InterfaceAdded.patch (boo#1076898) OBS-URL: https://build.opensuse.org/request/show/575485 OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=244
This commit is contained in:
parent
dc00cad162
commit
2450e18e8c
71
0001-core-Fixes-order-InterfaceAdded.patch
Normal file
71
0001-core-Fixes-order-InterfaceAdded.patch
Normal file
@ -0,0 +1,71 @@
|
||||
From 1873096352f518d3247f8efb3c2e0aa8804e50ac Mon Sep 17 00:00:00 2001
|
||||
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
|
||||
Date: Wed, 7 Feb 2018 09:35:07 -0200
|
||||
Subject: [PATCH] core: Fixes order InterfaceAdded
|
||||
|
||||
Registering on the callback of MGMT_OP_READ_ADV_FEATURES causes
|
||||
InterfacesAdded to be reschedule after the device objects which causes
|
||||
tools such as PulseAudio to consider it invalid.
|
||||
|
||||
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1534857
|
||||
---
|
||||
src/advertising.c | 28 +++++++++++++++-------------
|
||||
1 file changed, 15 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/advertising.c b/src/advertising.c
|
||||
index 94a8c4050..970c3d87b 100644
|
||||
--- a/src/advertising.c
|
||||
+++ b/src/advertising.c
|
||||
@@ -1032,14 +1032,6 @@ static void read_adv_features_callback(uint8_t status, uint16_t length,
|
||||
if (manager->max_ads == 0)
|
||||
return;
|
||||
|
||||
- if (!g_dbus_register_interface(btd_get_dbus_connection(),
|
||||
- adapter_get_path(manager->adapter),
|
||||
- LE_ADVERTISING_MGR_IFACE, methods,
|
||||
- NULL, properties, manager, NULL)) {
|
||||
- error("Failed to register " LE_ADVERTISING_MGR_IFACE);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
/* Reset existing instances */
|
||||
if (feat->num_instances)
|
||||
remove_advertising(manager, 0);
|
||||
@@ -1061,19 +1053,29 @@ static struct btd_adv_manager *manager_create(struct btd_adapter *adapter)
|
||||
}
|
||||
|
||||
manager->mgmt_index = btd_adapter_get_index(adapter);
|
||||
+ manager->clients = queue_new();
|
||||
+ manager->supported_flags = MGMT_ADV_FLAG_LOCAL_NAME;
|
||||
+
|
||||
+ if (!g_dbus_register_interface(btd_get_dbus_connection(),
|
||||
+ adapter_get_path(manager->adapter),
|
||||
+ LE_ADVERTISING_MGR_IFACE, methods,
|
||||
+ NULL, properties, manager, NULL)) {
|
||||
+ error("Failed to register " LE_ADVERTISING_MGR_IFACE);
|
||||
+ goto fail;
|
||||
+ }
|
||||
|
||||
if (!mgmt_send(manager->mgmt, MGMT_OP_READ_ADV_FEATURES,
|
||||
manager->mgmt_index, 0, NULL,
|
||||
read_adv_features_callback, manager, NULL)) {
|
||||
error("Failed to read advertising features");
|
||||
- manager_destroy(manager);
|
||||
- return NULL;
|
||||
+ goto fail;
|
||||
}
|
||||
|
||||
- manager->clients = queue_new();
|
||||
- manager->supported_flags = MGMT_ADV_FLAG_LOCAL_NAME;
|
||||
-
|
||||
return manager;
|
||||
+
|
||||
+fail:
|
||||
+ manager_destroy(manager);
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
struct btd_adv_manager *btd_adv_manager_new(struct btd_adapter *adapter)
|
||||
--
|
||||
2.16.1
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 11 21:12:36 UTC 2018 - seife+obs@b1-systems.com
|
||||
|
||||
- add 0001-core-Fixes-order-InterfaceAdded.patch (boo#1076898)
|
||||
- fix python shebang rpmlint warning for bluez-test
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 30 16:05:52 UTC 2018 - normand@linux.vnet.ibm.com
|
||||
|
||||
|
@ -38,6 +38,8 @@ Patch4: bluez-5.45-disable-broken-tests.diff
|
||||
Patch5: 0001-obexd-use-AM_LDFLAGS-for-linking.patch
|
||||
# disable tests for bypass boo#1078285
|
||||
Patch6: disable_some_obex_tests.patch
|
||||
# PATCH-FIX-UPSTREAM: fix errors with hotplugging, boo#1076898 --seife+obs@b1-systems.com
|
||||
Patch7: 0001-core-Fixes-order-InterfaceAdded.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: flex
|
||||
BuildRequires: libtool
|
||||
@ -145,6 +147,7 @@ desktop specific applets like blueman or GNOME or KDE applets).
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
%patch6 -p1
|
||||
%endif
|
||||
%patch7 -p1
|
||||
mkdir dbus-apis
|
||||
cp -a doc/*.txt dbus-apis/
|
||||
# FIXME: Change the dbus service to be a real service, not systemd launched
|
||||
@ -200,6 +203,9 @@ install --mode 0644 -D src/main.conf %{buildroot}/%{_sysconfdir}/bluetooth/main.
|
||||
cd %{buildroot}%{_libdir}/bluez/test
|
||||
chmod 0644 *.py *.xml *.dtd
|
||||
|
||||
# fix python shebang
|
||||
sed -i -e '1s/env p/p/' %{buildroot}/usr/lib64/bluez/test/example-gatt-{client,server}
|
||||
|
||||
%check
|
||||
%if ! 0%{?qemu_user_space_build}
|
||||
##make %%{?_smp_mflags} check
|
||||
|
Loading…
Reference in New Issue
Block a user