[net-config] Don't emit WiFiConnectFail signal when DBUS timed out 03/89703/1
authorSaurav Babu <saurav.babu@samsung.com>
Mon, 26 Sep 2016 11:28:26 +0000 (16:58 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Mon, 26 Sep 2016 11:28:26 +0000 (16:58 +0530)
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 <saurav.babu@samsung.com>
src/wifi.c

index bf1f8363c711562965e73b2c13f238a1bc08259e..86c3bb665738a8b8ad3c22fcf48c462a9331f4dd 100755 (executable)
@@ -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",