[gnome-bluetooth/fedora-11] Fix crash on pairing request of known rfcomm device
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/fedora-11] Fix crash on pairing request of known rfcomm device
- Date: Wed, 16 Sep 2009 10:43:56 +0000 (UTC)
commit 016e07941e3fac523f339f144aad0880118ccf36
Author: Stanislav Brabec <sbrabec suse cz>
Date: Thu Sep 10 16:20:35 2009 +0100
Fix crash on pairing request of known rfcomm device
Fixes crash after access attempt to the device configured
in rfcomm.conf, but not yet paired.
How to reproduce:
1. Configure an unknown RFCOMM device that requires authentication in
rfcomm.conf (e. g. mobile phone).
2. run pppd on /dev/rfcomm1
Behavior:
- Pairing request on mobile phone
- Crash of bluetooth-applet on desktop
lib/bluetooth-client.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index c56cc8e..d7fef54 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -663,7 +663,7 @@ static void add_device(DBusGProxy *adapter, GtkTreeIter *parent,
name = value ? g_value_get_string(value) : NULL;
value = g_hash_table_lookup(hash, "Class");
- type = class_to_type(g_value_get_uint(value));
+ type = value ? class_to_type(g_value_get_uint(value)) : BLUETOOTH_TYPE_ANY;
value = g_hash_table_lookup(hash, "Icon");
icon = value ? g_value_get_string(value) : "bluetooth";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]