[bluez/f20] Fix problem unsetting discoverable

Bastien Nocera hadess at fedoraproject.org
Fri Sep 20 16:37:32 UTC 2013


commit adf5662e2452851ef9402433aa42a502e1d82546
Author: Bastien Nocera <hadess at hadess.net>
Date:   Fri Sep 20 18:37:17 2013 +0200

    Fix problem unsetting discoverable

 ...ssing-timeout-when-disabling-discoverable.patch |   29 ++++++++++++++++++++
 bluez.spec                                         |   10 ++++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/0001-core-Fix-passing-timeout-when-disabling-discoverable.patch b/0001-core-Fix-passing-timeout-when-disabling-discoverable.patch
new file mode 100644
index 0000000..9c1cef9
--- /dev/null
+++ b/0001-core-Fix-passing-timeout-when-disabling-discoverable.patch
@@ -0,0 +1,29 @@
+From 12494337e4ce67ce927bd2d8c86e9c176ec3e36f Mon Sep 17 00:00:00 2001
+From: Johan Hedberg <johan.hedberg at intel.com>
+Date: Fri, 20 Sep 2013 11:17:34 -0500
+Subject: [PATCH] core: Fix passing timeout when disabling discoverable mode
+
+We should only pass a timeout value when enabling discoverable mode.
+When disabling passing something non-zero would yield a "invalid
+parameters" error.
+---
+ src/adapter.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/adapter.c b/src/adapter.c
+index 17f5508..5434a07 100644
+--- a/src/adapter.c
++++ b/src/adapter.c
+@@ -1890,7 +1890,8 @@ static void property_set_mode(struct btd_adapter *adapter, uint32_t setting,
+ 	case MGMT_SETTING_DISCOVERABLE:
+ 		memset(&cp, 0, sizeof(cp));
+ 		cp.val = mode;
+-		cp.timeout = htobs(adapter->discoverable_timeout);
++		if (cp.val)
++			cp.timeout = htobs(adapter->discoverable_timeout);
+ 
+ 		opcode = MGMT_OP_SET_DISCOVERABLE;
+ 		param = &cp;
+-- 
+1.8.3.1
+
diff --git a/bluez.spec b/bluez.spec
index 6d07398..113bb4a 100644
--- a/bluez.spec
+++ b/bluez.spec
@@ -3,7 +3,7 @@
 Summary: Bluetooth utilities
 Name: bluez
 Version: 5.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: Applications/System
 URL: http://www.bluez.org/
@@ -15,6 +15,8 @@ Source1: bluez.gitignore
 Patch1: playstation-peripheral-pugin-v5.x.patch
 ## Ubuntu patches
 Patch2: 0001-work-around-Logitech-diNovo-Edge-keyboard-firmware-i.patch
+# https://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=12494337e4ce67ce927bd2d8c86e9c176ec3e36f
+Patch3: 0001-core-Fix-passing-timeout-when-disabling-discoverable.patch
 
 BuildRequires: git
 BuildRequires: flex
@@ -224,6 +226,12 @@ mkdir -p $RPM_BUILD_ROOT/%{_libdir}/bluetooth/
 /lib/udev/rules.d/97-hid2hci.rules
 
 %changelog
+* Fri Sep 20 2013 Bastien Nocera <bnocera at redhat.com> 5.9-2
+- Fix problem unsetting discoverable
+
+* Fri Sep 20 2013 Bastien Nocera <bnocera at redhat.com> 5.9-1
+- Update to 5.9
+
 * Fri Aug 16 2013 Kalev Lember <kalevlember at gmail.com> - 5.8-2
 - Don't pull in -libs for the other subpackages
 - Remove a stray .la file


More information about the scm-commits mailing list