summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-11-07 10:00:06 +0100
committerThomas Haller <thaller@redhat.com>2015-11-07 10:01:28 +0100
commit869d83c791b32955cd61eb8f7a05379af2ff6a92 (patch)
treed02f0cfb8ee71c2bdb8848c88e22ee91e0066b19
parent6bc037ca2f5d1cfa3fabf77604c1c529d047afcc (diff)
downloadNetworkManager-869d83c791b32955cd61eb8f7a05379af2ff6a92.tar.gz
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.
-rw-r--r--src/devices/wifi/nm-device-wifi.c2
1 files changed, 1 insertions, 1 deletions
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;