[gnome-control-center] network: Fix more potential crashers for WWAN
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] network: Fix more potential crashers for WWAN
- Date: Wed, 3 Sep 2014 16:16:38 +0000 (UTC)
commit c515a6e67e7e356135977557ce4b0e927dcafecc
Author: Bastien Nocera <hadess hadess net>
Date: Wed Sep 3 13:23:20 2014 +0200
network: Fix more potential crashers for WWAN
And virtual devices. Again, listening on the long-lasting client
object but expecting the user_data (the object) to be around when
it might have been destroyed already.
https://bugzilla.gnome.org/show_bug.cgi?id=735932
panels/network/net-device-mobile.c | 6 +++---
panels/network/net-virtual-device.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/panels/network/net-device-mobile.c b/panels/network/net-device-mobile.c
index dad3a4a..71379f9 100644
--- a/panels/network/net-device-mobile.c
+++ b/panels/network/net-device-mobile.c
@@ -767,9 +767,9 @@ net_device_mobile_constructed (GObject *object)
}
client = net_object_get_client (NET_OBJECT (device_mobile));
- g_signal_connect (client, "notify::wwan-enabled",
- G_CALLBACK (mobilebb_enabled_toggled),
- device_mobile);
+ g_signal_connect_object (client, "notify::wwan-enabled",
+ G_CALLBACK (mobilebb_enabled_toggled),
+ device_mobile, 0);
nm_device_mobile_refresh_ui (device_mobile);
}
diff --git a/panels/network/net-virtual-device.c b/panels/network/net-virtual-device.c
index c146527..aeacb7e 100644
--- a/panels/network/net-virtual-device.c
+++ b/panels/network/net-virtual-device.c
@@ -323,10 +323,10 @@ net_virtual_device_constructed (GObject *object)
client = net_object_get_client (NET_OBJECT (virtual_device));
- g_signal_connect (client, "device-added",
- G_CALLBACK (device_added_cb), virtual_device);
- g_signal_connect (client, "device-removed",
- G_CALLBACK (device_removed_cb), virtual_device);
+ g_signal_connect_object (client, "device-added",
+ G_CALLBACK (device_added_cb), virtual_device, 0);
+ g_signal_connect_object (client, "device-removed",
+ G_CALLBACK (device_removed_cb), virtual_device, 0);
devices = nm_client_get_devices (client);
if (devices) {
for (i = 0; i < devices->len; i++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]