From ed86f2d7d9ac950783dc24f603fd7a1c759dad02 Mon Sep 17 00:00:00 2001 From: Sumit Aggarwal Date: Thu, 11 Feb 2016 19:26:07 +0530 Subject: [PATCH] Handling when supplicant returns InterfaceExists. 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 --- src/wifi-wps.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/wifi-wps.c b/src/wifi-wps.c index 3de9452..10ab769 100755 --- a/src/wifi-wps.c +++ b/src/wifi-wps.c @@ -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); -- 2.7.4