It's counter-intuitive to signal a ScanDone when the request to Scan succeeds
with the supplicant, because we'll get one ScanDone very early one when
the scan begins, which will trigger the usual mechanisms, and again once
the scan really is finished.

It does still make sense however to signal when the request fails.

Signed-off-by: Mathieu Trudel-Lapierre <[email protected]>
---
 src/supplicant-manager/nm-supplicant-interface.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/supplicant-manager/nm-supplicant-interface.c 
b/src/supplicant-manager/nm-supplicant-interface.c
index 77924b3..d495213 100644
--- a/src/supplicant-manager/nm-supplicant-interface.c
+++ b/src/supplicant-manager/nm-supplicant-interface.c
@@ -1176,10 +1176,11 @@ scan_request_cb (DBusGProxy *proxy, DBusGProxyCall 
*call_id, gpointer user_data)
        GError *err = NULL;
 
        nm_call_store_remove (priv->other_pcalls, proxy, call_id);
-       if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_INVALID))
+       if (!dbus_g_proxy_end_call (proxy, call_id, &err, G_TYPE_INVALID)) {
                nm_log_warn (LOGD_SUPPLICANT, "Could not get scan request 
result: %s", err->message);
+               g_signal_emit (self, signals[SCAN_DONE], 0, FALSE);
+       }
 
-       g_signal_emit (self, signals[SCAN_DONE], 0, err ? FALSE : TRUE);
        g_clear_error (&err);
 }
 
-- 
2.1.0

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to