summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-02-19 15:25:06 +0100
committerThomas Haller <thaller@redhat.com>2019-02-19 15:25:06 +0100
commit83c1a189ffaf898e0640b1b9b058c548095076c2 (patch)
treeb00a5d17f5bd426c3e2dd860bb72a011108a6477
parent10600bdb699a9edfa5824e307af33628b728d15d (diff)
parent3a2aa5632db84da8bac990fa842c2cb1f6df645a (diff)
downloadNetworkManager-83c1a189ffaf898e0640b1b9b058c548095076c2.tar.gz
wifi-p2p: merge branch 'benzea/fix-p2p-crash'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/85
-rw-r--r--src/devices/wifi/nm-device-wifi-p2p.c8
-rw-r--r--src/devices/wifi/nm-device-wifi.c6
2 files changed, 14 insertions, 0 deletions
diff --git a/src/devices/wifi/nm-device-wifi-p2p.c b/src/devices/wifi/nm-device-wifi-p2p.c
index a6259273ea..56e82fe540 100644
--- a/src/devices/wifi/nm-device-wifi-p2p.c
+++ b/src/devices/wifi/nm-device-wifi-p2p.c
@@ -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
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 6f23bf15cd..63eafe71bc 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -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);
}