Fixed wifi_direct_is_discoverable() issue when own device connected using GO Negotiation 93/56293/1
authorNishant Chaprana <n.chaprana@samsung.com>
Wed, 6 Jan 2016 05:16:24 +0000 (10:46 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Wed, 6 Jan 2016 05:16:24 +0000 (10:46 +0530)
This patch fixes the issue in wifi_direct_is_discoverable() API,
The API was not returning proper status when TV was Group Owner
and was connected suing GO Negotiation.

Change-Id: I35d540674d6c41b5935ce75f07f1e534a8f48659
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/wifi-direct-manager.spec
src/wifi-direct-client.c

index 2c77fa9..521efdd 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          wifi-direct-manager
 Summary:       Wi-Fi Direct manger
-Version:       1.2.114
+Version:       1.2.115
 Release:       1
 Group:      Network & Connectivity/Wireless
 License:    Apache-2.0
index b2ae8a9..ffb67ca 100755 (executable)
@@ -1673,13 +1673,17 @@ static gboolean wfd_client_process_request(GIOChannel *source,
                }
                break;
        case WIFI_DIRECT_CMD_IS_DISCOVERABLE:
-               if (manager->state == WIFI_DIRECT_STATE_DISCOVERING ||
-                               wfd_group_is_autonomous(manager->group) == TRUE)
-                       rsp.param1 = TRUE;
-               else
-                       rsp.param1 = FALSE;
+               {
+                       wfd_device_s *local = manager->local;
+
+                       if (manager->state == WIFI_DIRECT_STATE_DISCOVERING ||
+                                       local->dev_role == WFD_DEV_ROLE_GO)
+                               rsp.param1 = TRUE;
+                       else
+                               rsp.param1 = FALSE;
 
-               WDS_LOGI("Is discoverable : [%s]", rsp.param1 ? "Yes" : "No");
+                       WDS_LOGI("Is discoverable : [%s]", rsp.param1 ? "Yes" : "No");
+               }
                break;
        case WIFI_DIRECT_CMD_GET_SUPPORTED_WPS_MODE:    // manager (sync)
                res = wfd_local_get_supported_wps_mode(&rsp.param1);