Blame SOURCES/0001-network-Use-g_signal_connect_object-when-dealing-wit.patch

cee2d4
From 06b1f439c05a20b790cebb850d8ba514249583c4 Mon Sep 17 00:00:00 2001
cee2d4
From: Carlos Garnacho <carlosg@gnome.org>
cee2d4
Date: Tue, 3 Dec 2019 16:56:59 +0100
cee2d4
Subject: [PATCH] network: Use g_signal_connect_object() when dealing with
cee2d4
 NMClient
cee2d4
cee2d4
We may get signal emissions and property changes during NMClient
cee2d4
destruction, triggered from CcWifiPanel destruction. This triggers
cee2d4
callbacks that were not meant to trigger on panel destruction.
cee2d4
---
cee2d4
 panels/network/cc-wifi-panel.c | 28 ++++++++++++++--------------
cee2d4
 1 file changed, 14 insertions(+), 14 deletions(-)
cee2d4
cee2d4
diff --git a/panels/network/cc-wifi-panel.c b/panels/network/cc-wifi-panel.c
cee2d4
index 2c1cd17b7..7dd182e59 100644
cee2d4
--- a/panels/network/cc-wifi-panel.c
cee2d4
+++ b/panels/network/cc-wifi-panel.c
cee2d4
@@ -621,20 +621,20 @@ cc_wifi_panel_init (CcWifiPanel *self)
cee2d4
   /* Load NetworkManager */
cee2d4
   self->client = nm_client_new (NULL, NULL);
cee2d4
 
cee2d4
-  g_signal_connect (self->client,
cee2d4
-                    "device-added",
cee2d4
-                    G_CALLBACK (device_added_cb),
cee2d4
-                    self);
cee2d4
-
cee2d4
-  g_signal_connect (self->client,
cee2d4
-                    "device-removed",
cee2d4
-                    G_CALLBACK (device_removed_cb),
cee2d4
-                    self);
cee2d4
-
cee2d4
-  g_signal_connect (self->client,
cee2d4
-                    "notify::wireless-enabled",
cee2d4
-                    G_CALLBACK (wireless_enabled_cb),
cee2d4
-                    self);
cee2d4
+  g_signal_connect_object (self->client,
cee2d4
+                           "device-added",
cee2d4
+                           G_CALLBACK (device_added_cb),
cee2d4
+                           self, 0);
cee2d4
+
cee2d4
+  g_signal_connect_object (self->client,
cee2d4
+                           "device-removed",
cee2d4
+                           G_CALLBACK (device_removed_cb),
cee2d4
+                           self, 0);
cee2d4
+
cee2d4
+  g_signal_connect_object (self->client,
cee2d4
+                           "notify::wireless-enabled",
cee2d4
+                           G_CALLBACK (wireless_enabled_cb),
cee2d4
+                           self, 0);
cee2d4
 
cee2d4
   /* Load Wi-Fi devices */
cee2d4
   load_wifi_devices (self);
cee2d4
-- 
cee2d4
2.24.0
cee2d4