wifi-p2p: merge branch 'benzea/fix-p2p-crash'

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/85
This commit is contained in:
Thomas Haller 2019-02-19 15:25:06 +01:00
commit 83c1a189ff
2 changed files with 14 additions and 0 deletions

View file

@ -945,6 +945,10 @@ supplicant_interfaces_release (NMDeviceWifiP2P *self, gboolean set_is_waiting)
supplicant_group_interface_release (self);
nm_device_state_changed (NM_DEVICE (self),
NM_DEVICE_STATE_UNAVAILABLE,
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED);
if (set_is_waiting)
_set_is_waiting_for_supplicant (self, TRUE);
}
@ -1133,6 +1137,10 @@ nm_device_wifi_p2p_set_mgmt_iface (NMDeviceWifiP2P *self,
G_CALLBACK (supplicant_iface_group_started_cb),
self);
nm_device_queue_recheck_available (NM_DEVICE (self),
NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE,
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED);
done:
_set_is_waiting_for_supplicant (self,
!priv->mgmt_iface

View file

@ -3396,6 +3396,12 @@ dispose (GObject *object)
remove_all_aps (self);
if (priv->p2p_device) {
/* Destroy the P2P device. */
g_object_remove_weak_pointer (G_OBJECT (priv->p2p_device), (gpointer*) &priv->p2p_device);
nm_device_wifi_p2p_remove (g_steal_pointer (&priv->p2p_device));
}
G_OBJECT_CLASS (nm_device_wifi_parent_class)->dispose (object);
}