From 965740535128e8cbaec380f2978178cac28f6ad6 Mon Sep 17 00:00:00 2001 From: Saurav Babu Date: Mon, 26 Sep 2016 16:58:26 +0530 Subject: [PATCH] [net-config] Don't emit WiFiConnectFail signal when DBUS timed out Current Asynchronous DBUS timeout value in net-config is 15secs. It is very less time to notify Application about WiFiConnectFail. So when DBUS timeout occurs then don't emit WiFiConnectFail signal. ConnMan will notify about WiFi Connection failure with proper reason later. Change-Id: I78e9a66be5181127c095eca06c2c86feb6adb536 Signed-off-by: Saurav Babu --- src/wifi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/wifi.c b/src/wifi.c index bf1f836..86c3bb6 100755 --- a/src/wifi.c +++ b/src/wifi.c @@ -86,6 +86,14 @@ void __netconfig_wifi_connect_reply(GObject *source_object, GAsyncResult *res, g_dbus_connection_call_finish(conn, res, &error); if (error != NULL) { ERR("WiFi Connection Error [%s]", error->message); + /* No need to emit WiFiConnectFail signal if Connection is + * in progress */ + if (error->code == G_IO_ERROR_TIMED_OUT) { + g_error_free(error); + DBG("WiFi Connection in Progress"); + netconfig_gdbus_pending_call_unref(); + return; + } g_error_free(error); if (netconfig_dbus_emit_signal(NULL, NETCONFIG_WIFI_PATH, NETCONFIG_WIFI_INTERFACE, "WiFiConnectFail", -- 2.7.4