rpms/bluez-utils/F-8 bluez-utils-fix-crash-on-suspend.patch, NONE, 1.1
Bastien Nocera
hadess at fedoraproject.org
Tue Oct 14 19:38:11 UTC 2008
Author: hadess
Update of /cvs/pkgs/rpms/bluez-utils/F-8
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20332
Added Files:
bluez-utils-fix-crash-on-suspend.patch
Log Message:
Add missing patch
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;
}
More information about the fedora-extras-commits
mailing list