Configure systemctl settings for bluez-obexd correctly

Resolves rhbz#1259827
This commit is contained in:
Don Zickus 2017-02-03 13:29:38 -05:00
parent f5e71c5ea4
commit b5636a417c
2 changed files with 61 additions and 1 deletions

View File

@ -0,0 +1,49 @@
From f558fca8d64e3795b0654a90d343af1dd1d8b33c Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: Tue, 8 Nov 2016 10:38:43 +0200
Subject: [PATCH] core/gatt: Don't register attribute handler until core
service are registered
Wait until GAP and GATT service are registered to register attribute
handlers otherwise it may attempt to generate service changed without
having service changed registered which leads to print errors:
bluetoothd[2376]: Failed to obtain handles for "Service Changed" characteristic
---
src/gatt-database.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/gatt-database.c b/src/gatt-database.c
index 0877b25..d4bf5ad 100644
--- a/src/gatt-database.c
+++ b/src/gatt-database.c
@@ -2600,12 +2600,6 @@ struct btd_gatt_database *btd_gatt_database_new(struct btd_adapter *adapter)
database->profiles = queue_new();
database->ccc_callbacks = queue_new();
- database->db_id = gatt_db_register(database->db, gatt_db_service_added,
- gatt_db_service_removed,
- database, NULL);
- if (!database->db_id)
- goto fail;
-
addr = btd_adapter_get_address(adapter);
database->le_io = bt_io_listen(connect_cb, NULL, NULL, NULL, &gerr,
BT_IO_OPT_SOURCE_BDADDR, addr,
@@ -2641,6 +2635,13 @@ struct btd_gatt_database *btd_gatt_database_new(struct btd_adapter *adapter)
register_core_services(database);
+ database->db_id = gatt_db_register(database->db, gatt_db_service_added,
+ gatt_db_service_removed,
+ database, NULL);
+ if (!database->db_id)
+ goto fail;
+
+
return database;
fail:
--
2.7.4

View File

@ -3,7 +3,7 @@
Name: bluez
Summary: Bluetooth utilities
Version: 5.43
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://www.bluez.org/
@ -18,6 +18,7 @@ Patch2: 0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
Patch3: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
Patch4: 0002-autopair-Don-t-handle-the-iCade.patch
Patch5: 0004-agent-Assert-possible-infinite-loop.patch
Patch6: 0001-core-gatt-Don-t-register-attribute-handler-until-cor.patch
BuildRequires: git
BuildRequires: dbus-devel >= 1.6
@ -179,6 +180,12 @@ sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' ${RPM_
%post hid2hci
/sbin/udevadm trigger --subsystem-match=usb
%post obexd
%systemd_user_post obex.service
%preun obexd
%systemd_user_preun obex.service
%files
%{!?_licensedir:%global license %%doc}
%license COPYING
@ -245,6 +252,10 @@ sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' ${RPM_
%{_userunitdir}/obex.service
%changelog
* Fri Feb 3 2017 Don Zickus <dzickus@redhat.com> 5.43-3
- Configure systemctl settings for bluez-obexd correctly
- Resolves rhbz#1259827
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 5.43-2
- Rebuild for readline 7.x