Hello community,

here is the log from the commit of package gnome-bluetooth for openSUSE:Factory
checked in at Thu Oct 13 12:21:36 CEST 2011.



--------
--- openSUSE:Factory/gnome-bluetooth/gnome-bluetooth.changes    2011-10-02 
10:05:01.000000000 +0200
+++ gnome-bluetooth/gnome-bluetooth.changes     2011-10-11 10:07:10.000000000 
+0200
@@ -1,0 +2,7 @@
+Tue Oct 11 08:06:14 UTC 2011 - [email protected]
+
+- Add gnome-bluetooth-fix-crash.patch: fix various crashes in
+  libgnome-bluetooth, that help a bit getting bluetooth working in
+  GNOME. Part of bnc#722722.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  gnome-bluetooth-fix-crash.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-bluetooth.spec ++++++
--- /var/tmp/diff_new_pack.nqTct3/_old  2011-10-13 12:21:32.000000000 +0200
+++ /var/tmp/diff_new_pack.nqTct3/_new  2011-10-13 12:21:32.000000000 +0200
@@ -28,6 +28,8 @@
 Source1:        61-gnome-bluetooth-rfkill.rules
 # PATCH-MISSING-TAG -- See http://en.opensuse.org/Packaging/Patches
 Patch0:         lxde-support.patch
+# PATCH-FIX-UPSTREAM gnome-bluetooth-fix-crash.patch bgo#654172 bnc#722722 
[email protected] -- Fix various crashes in libgnome-bluetooth due to leaking 
objects
+Patch1:         gnome-bluetooth-fix-crash.patch
 BuildRequires:  fdupes
 BuildRequires:  gnome-doc-utils-devel
 BuildRequires:  gobject-introspection-devel
@@ -112,6 +114,7 @@
 %setup -q
 translation-update-upstream
 %patch0 -p1
+%patch1 -p1
 
 %if 0%{?BUILD_FROM_VCS}
 [ -x ./autogen.sh ] && NOCONFIGURE=1 ./autogen.sh

++++++ gnome-bluetooth-fix-crash.patch ++++++
>From 00e1b334b3014ce9ed72b5d3391313467d6fe181 Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Fri, 7 Oct 2011 15:46:51 +0200
Subject: [PATCH 1/2] lib: Disconnect signals from adapters and devices on
 finalize

This avoids some crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=661118

https://bugzilla.gnome.org/show_bug.cgi?id=654172
---
 lib/bluetooth-client.c |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index 86680c3..d7af201 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -1021,6 +1021,37 @@ bluetooth_client_set_property (GObject        *object,
        }
 }
 
+static gboolean
+disconnect_from_proxy_helper (GtkTreeModel *model,
+                             GtkTreePath  *path,
+                             GtkTreeIter  *iter,
+                             gpointer      data)
+{
+       BluetoothClient *client = data;
+       DBusGProxy *proxy;
+
+       gtk_tree_model_get(model, iter,
+                          BLUETOOTH_COLUMN_PROXY, &proxy, -1);
+
+       /* adapters */
+       g_signal_handlers_disconnect_by_func(proxy,
+                               adapter_changed, client);
+       g_signal_handlers_disconnect_by_func(proxy,
+                               device_created, client);
+       g_signal_handlers_disconnect_by_func(proxy,
+                               device_removed, client);
+       g_signal_handlers_disconnect_by_func(proxy,
+                               device_found, client);
+
+       /* devices */
+       g_signal_handlers_disconnect_by_func(proxy,
+                               device_changed, client);
+
+       g_object_unref(proxy);
+
+       return FALSE;
+}
+
 static void bluetooth_client_finalize(GObject *client)
 {
        BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
@@ -1041,6 +1072,8 @@ static void bluetooth_client_finalize(GObject *client)
                                        default_adapter_changed, client);
        g_object_unref(priv->manager);
 
+       gtk_tree_model_foreach (GTK_TREE_MODEL(priv->store), 
disconnect_from_proxy_helper, client);
+
        g_object_unref(priv->store);
 
        if (priv->default_adapter)
-- 
1.7.7


>From 63b442bb8a81776887350bad516943ddd61852b8 Mon Sep 17 00:00:00 2001
From: Vincent Untz <[email protected]>
Date: Tue, 11 Oct 2011 09:46:52 +0200
Subject: [PATCH 2/2] lib: Do not leak proxies for detectable interfaces of
 devices

This avoids signals that will cause crashes.

https://bugzilla.gnome.org/show_bug.cgi?id=654172
---
 lib/bluetooth-client.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/lib/bluetooth-client.c b/lib/bluetooth-client.c
index d7af201..e2f66c7 100644
--- a/lib/bluetooth-client.c
+++ b/lib/bluetooth-client.c
@@ -103,6 +103,7 @@ struct _BluetoothClientPrivate {
        DBusGProxy *manager;
        GtkTreeStore *store;
        GtkTreeRowReference *default_adapter;
+       GSList *horrible_workaround_for_leaked_ifaces;
 };
 
 enum {
@@ -266,6 +267,7 @@ device_services_changed (DBusGProxy *iface, const char 
*property,
 static GHashTable *
 device_list_nodes (DBusGProxy *device, BluetoothClient *client, gboolean 
connect_signal)
 {
+       BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
        GHashTable *table;
        guint i;
 
@@ -333,6 +335,8 @@ device_list_nodes (DBusGProxy *device, BluetoothClient 
*client, gboolean connect
                                dbus_g_proxy_connect_signal(iface, 
"PropertyChanged",
                                                            
G_CALLBACK(device_services_changed), client, NULL);
                        }
+
+                       priv->horrible_workaround_for_leaked_ifaces = 
g_slist_append (priv->horrible_workaround_for_leaked_ifaces, iface);
                }
        }
 
@@ -1055,6 +1059,7 @@ disconnect_from_proxy_helper (GtkTreeModel *model,
 static void bluetooth_client_finalize(GObject *client)
 {
        BluetoothClientPrivate *priv = BLUETOOTH_CLIENT_GET_PRIVATE(client);
+       GSList *l;
 
        DBG("client %p", client);
 
@@ -1079,6 +1084,15 @@ static void bluetooth_client_finalize(GObject *client)
        if (priv->default_adapter)
                gtk_tree_row_reference_free (priv->default_adapter);
 
+       for (l = priv->horrible_workaround_for_leaked_ifaces; l != NULL; l = 
l->next) {
+               DBusGProxy *iface = l->data;
+
+               g_signal_handlers_disconnect_by_func(iface,
+                                       device_services_changed, client);
+               g_object_unref (iface);
+       }
+       g_slist_free (priv->horrible_workaround_for_leaked_ifaces);
+
        G_OBJECT_CLASS(bluetooth_client_parent_class)->finalize(client);
 }
 
-- 
1.7.7

continue with "q"...



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to