-
Thomas Haller authored
A fake AP should be the current access point. The code in act_stage1_prepare violated this invariant for a short time by emitting signals before setting current_ap. Reorder statements, so that - fake AP gets created and added to ap_list - fake AP gets set as current_ap (suppressing notify signals) - emit ACCESS_POINT_ADDED signal - thaw notify::NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT signal When performing a series of actions that emit several signals, it is often difficult to emit them in an order, so that listeners get a consistent view. With this change, listeners will get ACCESS_POINT_ADDED signal, and the current ap already being set to the fake_ap. Next they get notify::NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT. There is no perfect solution, but this way it makes slightly more sense. Signed-off-by: Thomas Haller <thaller@redhat.com>
8fe613b4