Added handling to support TDLS feature #2 01/119801/3 accepted/tizen/common/20170322.153724 accepted/tizen/ivi/20170322.235807 accepted/tizen/mobile/20170322.235648 accepted/tizen/tv/20170322.235714 accepted/tizen/unified/20170322.235836 accepted/tizen/wearable/20170322.235742 submit/tizen/20170322.011410
authortaesub kim <taesub.kim@samsung.com>
Mon, 20 Mar 2017 07:22:52 +0000 (16:22 +0900)
committertaesub kim <taesub.kim@samsung.com>
Tue, 21 Mar 2017 00:16:48 +0000 (09:16 +0900)
Change-Id: I49c707ca31886b4142c8835526d7b71af3eecdae
Signed-off-by: Taesub Kim <taesub.kim@samsung.com>
include/wifi-tdls.h
src/signal-handler.c
src/wifi-tdls.c

index 53057b6..688566d 100755 (executable)
@@ -26,8 +26,9 @@
 #include <glib.h>
 #include "netsupplicant.h"
 
-void netconfig_wifi_tlds_connected_event(GVariant *message);
-void netconfig_wifi_tlds_disconnected_event(GVariant *message);
+void netconfig_wifi_tdls_peer_found_event(GVariant *message);
+void netconfig_wifi_tdls_connected_event(GVariant *message);
+void netconfig_wifi_tdls_disconnected_event(GVariant *message);
 void __netconfig_wifi_notify_tdls_connected_event(const char *peer_mac);
 gboolean handle_tdls_disconnect(Wifi *wifi, GDBusMethodInvocation *context, gchar *peer_mac_addr);
 gboolean handle_tdls_connected_peer(Wifi *wifi, GDBusMethodInvocation *context);
index a7a132f..442680a 100755 (executable)
@@ -595,8 +595,8 @@ static void _supplicant_tdls_connected(GDBusConnection *conn,
                const gchar *name, const gchar *path, const gchar *interface,
                const gchar *sig, GVariant *param, gpointer user_data)
 {
-       ERR("Received TDLS Connected Signal");
-       netconfig_wifi_tlds_connected_event(param);
+       DBG("Received TDLS Connected Signal");
+       netconfig_wifi_tdls_connected_event(param);
 
        return;
 }
@@ -605,8 +605,8 @@ static void _supplicant_tdls_disconnected(GDBusConnection *conn,
                const gchar *name, const gchar *path, const gchar *interface,
                const gchar *sig, GVariant *param, gpointer user_data)
 {
-       ERR("Received TDLS Disconnected Signal");
-       netconfig_wifi_tlds_disconnected_event(param);
+       DBG("Received TDLS Disconnected Signal");
+       netconfig_wifi_tdls_disconnected_event(param);
 
        return;
 }
@@ -615,7 +615,8 @@ static void _supplicant_tdls_peer_found(GDBusConnection *conn,
                const gchar *name, const gchar *path, const gchar *interface,
                const gchar *sig, GVariant *param, gpointer user_data)
 {
-       ERR("Received TDLS Peer Found Signal");
+       DBG("Received TDLS Peer Found Signal");
+       netconfig_wifi_tdls_peer_found_event(param);
        return;
 }
 
index 9c45374..3ae0291 100755 (executable)
@@ -192,7 +192,7 @@ gboolean handle_tdls_connected_peer(Wifi *wifi, GDBusMethodInvocation *context)
        return TRUE;
 }
 
-void netconfig_wifi_tlds_connected_event(GVariant *message)
+void netconfig_wifi_tdls_connected_event(GVariant *message)
 {
 
        DBG("[TizenMW<--WPAS] WiFi TDLS Connected EVENT");
@@ -208,7 +208,7 @@ void netconfig_wifi_tlds_connected_event(GVariant *message)
        __netconfig_wifi_notify_tdls_event("TDLSConnect", peer_mac);
 }
 
-void netconfig_wifi_tlds_disconnected_event(GVariant *message)
+void netconfig_wifi_tdls_disconnected_event(GVariant *message)
 {
        DBG("[TizenMW<--WPAS]: WiFi TDLS Disconnected EVENT");
        const gchar *peer_mac_addr = NULL;
@@ -221,3 +221,16 @@ void netconfig_wifi_tlds_disconnected_event(GVariant *message)
        } else
                INFO("TDLS Peer Disconnected peer_mac(%s) != peer_mac_address(%s)", peer_mac, peer_mac_addr);
 }
+
+
+void netconfig_wifi_tdls_peer_found_event(GVariant *message)
+{
+       DBG("[TizenMW<--WPAS]: WiFi TDLS Discovery EVENT");
+       const gchar *peer_mac_addr = NULL;
+
+       g_variant_get(message, "(s)", &peer_mac_addr);
+       INFO("Discover Peer Mac Address: [%s]", peer_mac_addr);
+
+       __netconfig_wifi_notify_tdls_event("TDLSPeerFound", peer_mac_addr);
+}
+