rpms/gnome-bluetooth/devel 0001-Bug-594055-applet-fails-to-connect-to-any-disconn.patch, NONE, 1.1 gnome-bluetooth.spec, 1.89, 1.90

Bastien Nocera hadess at fedoraproject.org
Thu Sep 3 17:31:33 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/gnome-bluetooth/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7918

Modified Files:
	gnome-bluetooth.spec 
Added Files:
	0001-Bug-594055-applet-fails-to-connect-to-any-disconn.patch 
Log Message:
* Thu Sep 03 2009 Bastien Nocera <bnocera at redhat.com> 2.27.90-2
- Fix connecting to audio devices not working when disconnected
  at start


0001-Bug-594055-applet-fails-to-connect-to-any-disconn.patch:
 bluetooth-enums.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE 0001-Bug-594055-applet-fails-to-connect-to-any-disconn.patch ---
>From b4b046cd37324454c7125d345cceabb5c6f61612 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess at hadess.net>
Date: Thu, 3 Sep 2009 18:17:43 +0100
Subject: [PATCH] =?utf-8?q?Bug=C2=A0594055=20-=20applet=20fails=20to=20connect=20to=20any=20disconnected=20audio=20device?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Hunted down by Peter Hurley <phurley at charter.net>.

Description
If the remote device is disconnected when the applet starts, the applet
will be unable to initiate connection to the audio interface of the
device.

Cause
Incorrect use of g_hash_table_lookup in the device_list_nodes() function
in lib/bluetooth-client.c

Discussion
For a given device, device_list_nodes() loops through the known
detectable interfaces (those in detectable_interfaces[]) and adds
them to the returned hash table if calling the interfaces's
.GetProperties dbus method returns true.

The value of the "Connected" property is then stored as the associated
value with the interface name as the key in the hash table.

The *connectable* interface "org.bluez.Audio" is only added if at least
either of the *detectable* interfaces "org.bluez.Headset" or
"org.bluez.AudioSink" were added the the hash table in previous
iterations within device_list_nodes().

However, the test for whether those *detectable* interfaces were added
is not correct. Currently, g_hash_table_lookup() is used to determine
if the interface names are in the hash table.  g_hash_table_lookup()
will return NULL if the the key is not present in the hash table,
OTHERWISE IT RETURNS THE VALUE ASSOCIATED WITH THE KEY. If that value
is 0 (== BLUETOOTH_STATUS_DISCONNECTED), the logic mistakenly believes
that the key is not present in the hash table, and as a result, fails
to add the only connectable audio interface "org.bluez.Audio".

Recommend
Either use g_hash_table_lookup_extended() to test for key presence
or change enum BLUET00TH_STATUS_DISCONNECTED to be != 0.
---
 lib/bluetooth-enums.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lib/bluetooth-enums.h b/lib/bluetooth-enums.h
index 7563c4c..450c38c 100644
--- a/lib/bluetooth-enums.h
+++ b/lib/bluetooth-enums.h
@@ -80,7 +80,8 @@ typedef enum {
 } BluetoothColumn;
 
 typedef enum {
-	BLUETOOTH_STATUS_DISCONNECTED = 0,
+	BLUETOOTH_STATUS_INVALID = 0,
+	BLUETOOTH_STATUS_DISCONNECTED,
 	BLUETOOTH_STATUS_CONNECTED,
 	BLUETOOTH_STATUS_CONNECTING,
 	BLUETOOTH_STATUS_PLAYING
-- 
1.6.2.5



Index: gnome-bluetooth.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gnome-bluetooth/devel/gnome-bluetooth.spec,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -p -r1.89 -r1.90
--- gnome-bluetooth.spec	2 Sep 2009 14:41:08 -0000	1.89
+++ gnome-bluetooth.spec	3 Sep 2009 17:31:32 -0000	1.90
@@ -1,6 +1,6 @@
 Name:		gnome-bluetooth
 Version:	2.27.90
-Release:	1%{?dist}
+Release:	2%{?dist}
 Summary:	Bluetooth graphical utilities
 
 Group:		Applications/Communications
@@ -34,6 +34,9 @@ Requires:	pulseaudio-module-bluetooth
 Requires(post):		desktop-file-utils
 Requires(postun):	desktop-file-utils
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=594055
+Patch0:		0001-Bug-594055-applet-fails-to-connect-to-any-disconn.patch
+
 %description
 The gnome-bluetooth package contains graphical utilities to setup,
 monitor and use Bluetooth devices.
@@ -63,6 +66,8 @@ for writing applications that require a 
 %prep
 %setup -q -n gnome-bluetooth-%{version}
 
+%patch0 -p1 -b .connect
+
 %build
 %configure --disable-desktop-update --disable-icon-update
 make %{?_smp_mflags}
@@ -194,6 +199,10 @@ fi
 %{_datadir}/gtk-doc/html/gnome-bluetooth/
 
 %changelog
+* Thu Sep 03 2009 Bastien Nocera <bnocera at redhat.com> 2.27.90-2
+- Fix connecting to audio devices not working when disconnected
+  at start
+
 * Wed Sep 02 2009 Bastien Nocera <bnocera at redhat.com> 2.27.90-1
 - Update to 2.27.90
 




More information about the scm-commits mailing list