Removed "LaunchDirect" call to net-config from wifi_direct_initialize 75/62075/1 accepted/tizen/common/20160316.160335 accepted/tizen/ivi/20160316.040516 accepted/tizen/mobile/20160316.040425 accepted/tizen/tv/20160316.040439 accepted/tizen/wearable/20160316.040502 submit/tizen/20160316.022156
authorNishant Chaprana <n.chaprana@samsung.com>
Mon, 14 Mar 2016 07:01:06 +0000 (12:31 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 14 Mar 2016 07:01:06 +0000 (12:31 +0530)
now wfd-manager starts with dbus auto activation logic, So launching
wfd-manager from net-config is not required anymore.
Also using this code with dbus auto activation leads to conditions
where two wfd-manager instances are running.

Change-Id: I5660fb454302b3955e87ee90244f5d6e7da67e7a
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/capi-network-wifi-direct.spec
src/include/wifi-direct-client-proxy.h
src/include/wifi-direct-dbus.h
src/wifi-direct-client-proxy.c

index 3f7f4565c9b441ec91ac5af1337bb307649879cc..b0a2f999d7499d918909d3c511df54f3754487cf 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-network-wifi-direct
 Summary:    Network WiFi-Direct Library
-Version:    1.2.51
+Version:    1.2.52
 Release:    1
 Group:      Network & Connectivity/API
 License:    Apache-2.0
index 66b6dd993a8f1ef6fdc22207d0aac2ff819891fa..b5dccfc5f47b23f1645de0be4b5325bf2bc592c4 100755 (executable)
 #include <stdbool.h>
 #include "wifi-direct.h"
 
-#define NETCONFIG_SERVICE              "net.netconfig"
-#define NETCONFIG_WIFI_INTERFACE       "net.netconfig.wifi"
-#define NETCONFIG_WIFI_PATH            "/net/netconfig/wifi"
-#define NETCONFIG_WIFI_LAUNCHDIRECT    "LaunchDirect"
-#define DBUS_REPLY_TIMEOUT (120 * 1000)
-
 #define SOCK_FD_MIN 3
 #define WIFI_DIRECT_WPA_LEN 64
 #define MACSTR_LEN 18
index 4713a2c7cc171422ff257d3148df716adf1e1d95..a2ac29910c12b63a3c8f4fd9149629c8dd3e4346 100644 (file)
@@ -75,4 +75,4 @@ int wifi_direct_dbus_unpack_ay(unsigned char *dst, GVariant *src, int size);
 }
 #endif
 
-#endif /* __NETCONFIG_NETDBUS_H__ */
+#endif /* __WIFI_DIRECT_DBUS_H__ */
index 9bc95db585549c6d2ffdb184dfddd5de128dc562..026ecc4fcdeb994b7b8c9f9c73c9c2b465b23118 100755 (executable)
@@ -563,49 +563,6 @@ void __wfd_client_print_persistent_group_info(wfd_persistent_group_info_s *list,
        WDC_LOGD("------------------------------------------\n");
 }
 
-static int __wfd_client_launch_server_dbus(void)
-{
-       GDBusConnection *netconfig_bus = NULL;
-       GError *g_error = NULL;
-
-#if !GLIB_CHECK_VERSION(2,36,0)
-       g_type_init();
-#endif
-       netconfig_bus = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &g_error);
-       if (netconfig_bus == NULL) {
-               if(g_error != NULL) {
-                       WDC_LOGE("Couldn't connect to system bus "
-                                       "error [%d: %s]", g_error->code, g_error->message);
-                       g_error_free(g_error);
-               }
-               return WIFI_DIRECT_ERROR_COMMUNICATION_FAILED;
-       }
-
-       g_dbus_connection_call_sync(netconfig_bus,
-                       NETCONFIG_SERVICE,
-                       NETCONFIG_WIFI_PATH,
-                       NETCONFIG_WIFI_INTERFACE,
-                       NETCONFIG_WIFI_LAUNCHDIRECT,
-                       NULL,
-                       NULL,
-                       G_DBUS_CALL_FLAGS_NONE,
-                       DBUS_REPLY_TIMEOUT,
-                       NULL,
-                       &g_error);
-
-       if(g_error !=NULL) {
-               WDC_LOGE("g_dbus_connection_call_sync() failed"
-                               "error [%d: %s]", g_error->code, g_error->message);
-               g_error_free(g_error);
-               return WIFI_DIRECT_ERROR_PERMISSION_DENIED;
-       }
-
-       g_object_unref(netconfig_bus);
-
-       WDC_LOGD("Successfully launched wfd-manager");
-       return WIFI_DIRECT_ERROR_NONE;
-}
-
 int wifi_direct_initialize(void)
 {
        __WDC_LOG_FUNC_START__;
@@ -639,11 +596,6 @@ int wifi_direct_initialize(void)
                return WIFI_DIRECT_ERROR_OPERATION_FAILED;
        }
 
-       WDC_LOGD("Launching wfd-server..\n");
-       res = __wfd_client_launch_server_dbus();
-       if (res != WIFI_DIRECT_ERROR_NONE)
-               WDC_LOGE("Failed to send dbus msg[%s]", strerror(errno));
-
        g_client_info.is_registered = TRUE;
 
        /* Initialize callbacks */