Handling when supplicant returns InterfaceExists. 32/59232/3
authorSumit Aggarwal <aggarwal.s@samsung.com>
Thu, 11 Feb 2016 13:56:07 +0000 (19:26 +0530)
committerSumit Aggarwal <aggarwal.s@samsung.com>
Tue, 5 Apr 2016 04:50:16 +0000 (21:50 -0700)
There can be a case when Interface already exists. So Supplication will
retun InterfaceExists with error. So Error case handling for such case
is added

Change-Id: I3cdd9dfcb661d70bb95f6a42ee006e46e15f4634
Signed-off-by: Sumit Aggarwal <aggarwal.s@samsung.com>
src/wifi-wps.c

index 3de9452..10ab769 100755 (executable)
@@ -402,6 +402,16 @@ static void __netconfig_wifi_interface_create_result(
                        __netconfig_wifi_wps_request_scan(path);
                        g_free(path);
                }
+       }
+       else if (NULL != strstr(error->message, ".InterfaceExists")) {
+               INFO("Error Message %s %s", error->message, path);
+               g_variant_get(message, "(o)", &path);
+               if (path) {
+                       __netconfig_wifi_wps_request_scan(path);
+                       g_free(path);
+               }
+               else
+                       __netconfig_wifi_wps_request_scan(NULL);
        } else {
                ERR("Failed to create interface, Error: %d[%s]", error->code, error->message);
                __netconfig_wps_set_mode(FALSE);