mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 09:30:16 +01:00
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
This commit is contained in:
parent
c23eb7043f
commit
0539725aef
1 changed files with 4 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue