diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-10-12 09:08:09 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-10-14 09:32:48 +0200 |
commit | 0539725aeff64a4fe3bf7b4c5ba077bba9bebb1d (patch) | |
tree | eb73b7638eb7e1a2a0ab021d49fa0de25747caa7 /src/supplicant-manager | |
parent | c23eb7043f5af0ec4c2acfae6ef0d6246066694f (diff) |
supplicant: fix cancellation of interface association
The @assoc_cancellable was never initialized and thus ineffective; fix
this.
Furthermore, we only cancel it in nm_supplicant_interface_disconnect()
as we expect that clients call the function before destroying the
interface. Don't assume this and also cancel it in dispose().
https://bugzilla.redhat.com/show_bug.cgi?id=1383628
Diffstat (limited to 'src/supplicant-manager')
-rw-r--r-- | src/supplicant-manager/nm-supplicant-interface.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c index 1cdb6180a..408704bc6 100644 --- a/src/supplicant-manager/nm-supplicant-interface.c +++ b/src/supplicant-manager/nm-supplicant-interface.c @@ -1295,6 +1295,7 @@ nm_supplicant_interface_set_config (NMSupplicantInterface *self, g_clear_object (&priv->cfg); if (cfg) { + priv->assoc_cancellable = g_cancellable_new (); priv->cfg = g_object_ref (cfg); g_dbus_proxy_call (priv->iface_proxy, DBUS_INTERFACE_PROPERTIES ".Set", @@ -1532,13 +1533,9 @@ dispose (GObject *object) g_signal_handlers_disconnect_by_data (priv->iface_proxy, object); g_clear_object (&priv->iface_proxy); - if (priv->init_cancellable) - g_cancellable_cancel (priv->init_cancellable); - g_clear_object (&priv->init_cancellable); - - if (priv->other_cancellable) - g_cancellable_cancel (priv->other_cancellable); - g_clear_object (&priv->other_cancellable); + nm_clear_g_cancellable (&priv->init_cancellable); + nm_clear_g_cancellable (&priv->other_cancellable); + nm_clear_g_cancellable (&priv->assoc_cancellable); g_clear_object (&priv->wpas_proxy); g_clear_pointer (&priv->bss_proxies, (GDestroyNotify) g_hash_table_destroy); |