device/wifi: don't emit wrong SCAN_DONE signal when "Scan" request completes

scan_request_cb() handles the answer from the D-Bus "Scan" method.
At that point, the scan is not yet done, it merely started. It is
wrong to already signal SCAN_DONE.

The only place where we want to signal SCAN_DONE is when we actually
receive the "ScanDone" D-Bus signal.
This commit is contained in:
Thomas Haller 2017-02-02 22:36:11 +01:00
parent 40a4cc5b2d
commit 75356841fb

View file

@ -1269,7 +1269,6 @@ scan_request_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
return;
self = NM_SUPPLICANT_INTERFACE (user_data);
if (error) {
if (_nm_dbus_error_has_name (error, "fi.w1.wpa_supplicant1.Interface.ScanError"))
_LOGD ("could not get scan request result: %s", error->message);
@ -1278,7 +1277,6 @@ scan_request_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
_LOGW ("could not get scan request result: %s", error->message);
}
}
g_signal_emit (self, signals[SCAN_DONE], 0, error ? FALSE : TRUE);
}
gboolean