device/wifi: first emit NEW_BSS signals before SCAN_DONE

In the SCAN_DONE handler, NMDeviceWifi resets the flag that indicates
that a current scan request is pending. We need to first obtain the
new APs (NEW_BSS) before signalling SCAN_DONE.
This commit is contained in:
Thomas Haller 2017-02-02 22:30:37 +01:00
parent e4a9942ba8
commit 40a4cc5b2d

View file

@ -562,8 +562,6 @@ wpas_iface_scan_done (GDBusProxy *proxy,
/* Cache last scan completed time */
priv->last_scan = nm_utils_get_monotonic_timestamp_s ();
g_signal_emit (self, signals[SCAN_DONE], 0, success);
/* Emit NEW_BSS so that wifi device has the APs (in case it removed them) */
g_hash_table_iter_init (&iter, priv->bss_proxies);
while (g_hash_table_iter_next (&iter, (gpointer) &bss_path, (gpointer) &bss_proxy)) {
@ -577,6 +575,8 @@ wpas_iface_scan_done (GDBusProxy *proxy,
}
}
}
g_signal_emit (self, signals[SCAN_DONE], 0, success);
}
static void