From 29b6ba0cd4a81df73f0a44366e7380101de6f5c0 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 2 Feb 2017 22:36:11 +0100 Subject: [PATCH] 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. (cherry picked from commit 75356841fb85c5691c8694bcc8cc0a77bdf08b6b) --- src/supplicant/nm-supplicant-interface.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c index 2698b74f7e..f932fe8b53 100644 --- a/src/supplicant/nm-supplicant-interface.c +++ b/src/supplicant/nm-supplicant-interface.c @@ -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