From 0c1e290c97555c3ed14bed9d0ab55a5dab2c7a2e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 7 Nov 2015 10:00:06 +0100 Subject: [PATCH] wifi/ap: set the current-ap after adding the new AP First add the new AP, before setting it as current. Also set the AP *after* thawing the notifications. Otherwise it is not clear which notification gets raised first as their order is undefined. But we want that the client first sees the new AP and later gets a notification about having a new current. --- src/devices/wifi/nm-device-wifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 99e35a9651..68c6745295 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -2346,9 +2346,9 @@ act_stage1_prepare (NMDevice *device, NMDeviceStateReason *reason) ap_path = nm_exported_object_export (NM_EXPORTED_OBJECT (ap)); g_hash_table_insert (priv->aps, (gpointer) ap_path, ap); g_object_freeze_notify (G_OBJECT (self)); - set_current_ap (self, ap, FALSE, FALSE); emit_ap_added_removed (self, ACCESS_POINT_ADDED, ap, TRUE); g_object_thaw_notify (G_OBJECT (self)); + set_current_ap (self, ap, FALSE, FALSE); nm_active_connection_set_specific_object (NM_ACTIVE_CONNECTION (req), ap_path); return NM_ACT_STAGE_RETURN_SUCCESS;