From d5b709fbe47251ef2a4b8c5f37998054f789e55f Mon Sep 17 00:00:00 2001 From: Yu Date: Mon, 18 Feb 2019 16:58:58 +0900 Subject: [PATCH] Remove IsGroupOwner call when application initialize capi Description : The IsGroupOnwer method call was used to check privilege at wifi_direct_initialize. But AddClient method call checks privilege also. So, that became unnecessary overhead. Change-Id: Ibea141920a9f703644ece0dd483d945cc0059e12 Signed-off-by: Yu jiung --- packaging/capi-network-wifi-direct.spec | 2 +- src/wifi-direct-client-proxy.c | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/packaging/capi-network-wifi-direct.spec b/packaging/capi-network-wifi-direct.spec index ec96580..c80d881 100755 --- a/packaging/capi-network-wifi-direct.spec +++ b/packaging/capi-network-wifi-direct.spec @@ -3,7 +3,7 @@ Name: capi-network-wifi-direct Summary: Network WiFi-Direct Library -Version: 1.2.99 +Version: 1.2.100 Release: 1 Group: Network & Connectivity/API License: Apache-2.0 diff --git a/src/wifi-direct-client-proxy.c b/src/wifi-direct-client-proxy.c index bbbdd32..98872ca 100755 --- a/src/wifi-direct-client-proxy.c +++ b/src/wifi-direct-client-proxy.c @@ -854,7 +854,6 @@ int wifi_direct_initialize(void) GError* error = NULL; GVariant *reply = NULL; bool wifi_direct_enable; - gboolean val; int res = 0; if (g_client_info.is_registered == TRUE) { @@ -892,16 +891,6 @@ int wifi_direct_initialize(void) g_variant_get(reply, "(i)", &res); WDC_LOGD("Active Client id Added, ret[%d]", res); - reply = wifi_direct_dbus_method_call_sync(WFD_MANAGER_GROUP_INTERFACE, - "IsGroupOwner", NULL, &error); - - res = __net_wifidirect_gerror_to_enum(error); - if (res != WIFI_DIRECT_ERROR_NONE) - return res; - - g_variant_get(reply, "(b)", &val); - WDC_LOGD("is group owner [%s]", val ? "YES" : "NO"); - g_client_info.is_registered = TRUE; if (__wfd_check_display_feature() == WIFI_DIRECT_ERROR_NONE) -- 2.7.4