rpms/bluez-utils/F-9 bluez-utils-fix-crash-on-suspend.patch, NONE, 1.1 bluez-utils.spec, 1.107, 1.108

Bastien Nocera hadess at fedoraproject.org
Tue Oct 14 19:26:25 UTC 2008


Author: hadess

Update of /cvs/pkgs/rpms/bluez-utils/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14634

Modified Files:
	bluez-utils.spec 
Added Files:
	bluez-utils-fix-crash-on-suspend.patch 
Log Message:
* Tue Oct 14 2008 - Bastien Nocera <bnocera at redhat.com> - 3.36-2
- Fix crash on resume, as seen and fixed in BlueZ 4.x


bluez-utils-fix-crash-on-suspend.patch:

--- NEW FILE bluez-utils-fix-crash-on-suspend.patch ---
--- bluez-utils-3.36/hcid/security.c.orig	2008-10-14 20:16:05.000000000 +0100
+++ bluez-utils-3.36/hcid/security.c	2008-10-14 20:16:12.000000000 +0100
@@ -792,6 +792,20 @@ static inline void conn_request(int dev,
 	write_remote_class(sba, &evt->bdaddr, class);
 }
 
+static void delete_channel(GIOChannel *chan)
+{
+	int i;
+
+	/* Look for the GIOChannel in the table */
+	for (i = 0; i < HCI_MAX_DEV; i++)
+		if (io_data[i].channel == chan) {
+			stop_security_manager(i);
+			return;
+		}
+
+	error("IO channel not found in the io_data table");
+}
+
 static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data)
 {
 	unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr = buf;
@@ -802,14 +816,14 @@ static gboolean io_security_event(GIOCha
 	GIOError err;
 
 	if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR)) {
-		g_io_channel_unref(chan);
+		delete_channel(chan);
 		return FALSE;
 	}
 
 	if ((err = g_io_channel_read(chan, (gchar *) buf, sizeof(buf), &len))) {
 		if (err == G_IO_ERROR_AGAIN)
 			return TRUE;
-		g_io_channel_unref(chan);
+		delete_channel(chan);
 		return FALSE;
 	}
 


Index: bluez-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bluez-utils/F-9/bluez-utils.spec,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- bluez-utils.spec	13 Sep 2008 21:20:25 -0000	1.107
+++ bluez-utils.spec	14 Oct 2008 19:25:55 -0000	1.108
@@ -1,7 +1,7 @@
 Summary: Bluetooth utilities 
 Name: bluez-utils
 Version: 3.36
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: GPLv2+
 Group: Applications/System
 Source: http://bluez.sourceforge.net/download/%{name}-%{version}.tar.gz
@@ -14,6 +14,7 @@
 Patch0: bluez-utils-2.3-conf.patch
 Patch1: bluez-utils-oui-usage.patch
 Patch2: bluez-utils-3.36-input-no-sdp.patch
+Patch3: bluez-utils-fix-crash-on-suspend.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 URL: http://www.bluez.org/
@@ -76,6 +77,7 @@
 %patch0 -p1
 %patch1 -p0 -b .oui
 %patch2 -p1
+%patch3 -p1
 
 %build
 %configure --with-bluez-libs=%{_libdir} --enable-pie --enable-debug \
@@ -160,6 +162,9 @@
 %{_libdir}/alsa-lib/*.so
 
 %changelog
+* Tue Oct 14 2008 - Bastien Nocera <bnocera at redhat.com> - 3.36-2
+- Fix crash on resume, as seen and fixed in BlueZ 4.x
+
 * Sat Sep 13 2008 - David Woodhouse <David.Woodhouse at intel.com> - 3.36-1
 - Update to 3.36  
 - Re-enable pand




More information about the scm-commits mailing list