rpms/bluez/devel bluez-bluetoothd-crasher.patch, NONE, 1.1 bluez.spec, 1.6, 1.7
Bastien Nocera
hadess at fedoraproject.org
Thu Sep 25 00:02:31 UTC 2008
Author: hadess
Update of /cvs/pkgs/rpms/bluez/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29186
Modified Files:
bluez.spec
Added Files:
bluez-bluetoothd-crasher.patch
Log Message:
* Wed Sep 24 2008 - Bastien Nocera <bnocera at redhat.com> - 4.6-2
- Fix possible crasher on resume from suspend
bluez-bluetoothd-crasher.patch:
--- NEW FILE bluez-bluetoothd-crasher.patch ---
diff --git a/src/security.c b/src/security.c
index fd2535f..6a9a5c4 100644
--- a/src/security.c
+++ b/src/security.c
@@ -46,6 +46,7 @@
#include <dbus/dbus.h>
+#include "hcid.h"
#include "logging.h"
#include "textfile.h"
@@ -789,6 +790,27 @@ static inline void conn_request(int dev, bdaddr_t *sba, void *ptr)
write_remote_class(sba, &evt->bdaddr, class);
}
+static void delete_channel(GIOChannel *chan)
+{
+ gint i, found;
+
+ /* Look for the GIOChannel in the table */
+ found = -1;
+ for (i = 0; i < HCI_MAX_DEV; i++) {
+ if (io_data[i].channel == chan) {
+ found = i;
+ break;
+ }
+ }
+
+ if (found == -1) {
+ g_warning("IO channel not found in the io_data table");
+ return;
+ }
+
+ stop_security_manager(i);
+}
+
static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data)
{
unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr = buf;
@@ -799,14 +821,14 @@ static gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer
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.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bluez/devel/bluez.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- bluez.spec 14 Sep 2008 21:11:24 -0000 1.6
+++ bluez.spec 25 Sep 2008 00:02:00 -0000 1.7
@@ -1,13 +1,14 @@
Summary: Bluetooth utilities
Name: bluez
Version: 4.6
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: Applications/System
Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
Source1: bluetooth.init
Source2: bluetooth.conf
Patch1: bluez-utils-oui-usage.patch
+Patch2: bluez-bluetoothd-crasher.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://www.bluez.org/
@@ -96,6 +97,7 @@
%setup -q
%patch1 -p0 -b .oui
+%patch2 -p0 -b .security
%build
%configure --enable-cups --enable-hid2hci --enable-dfutool --enable-tools --enable-bccmd --enable-gstreamer --enable-hidd --enable-pand --enable-dund
@@ -181,6 +183,9 @@
%{_libdir}/alsa-lib/*.so
%changelog
+* Wed Sep 24 2008 - Bastien Nocera <bnocera at redhat.com> - 4.6-2
+- Fix possible crasher on resume from suspend
+
* Sun Sep 14 2008 - David Woodhouse <David.Woodhouse at intel.com> - 4.6-1
- Update to 4.6
More information about the fedora-extras-commits
mailing list