[Support Persistent Group] Identify whether created group is persistent or not. 07/71807/2
authorNishant Chaprana <n.chaprana@samsung.com>
Fri, 27 May 2016 07:09:58 +0000 (12:39 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Thu, 2 Jun 2016 07:23:21 +0000 (12:53 +0530)
Change-Id: I454a4ab86d1815c56ec213413707877490afb4cb
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
oem/wifi-direct-oem.h
packaging/wifi-direct-manager.spec
plugin/wpasupplicant/ctrl_iface_dbus/wfd-plugin-wpasupplicant.c
plugin/wpasupplicant/ctrl_iface_sock/include/wfd-plugin-wpasupplicant.h
plugin/wpasupplicant/ctrl_iface_sock/wfd-plugin-wpasupplicant.c

index 080bb00..a4a9bee 100755 (executable)
@@ -242,6 +242,7 @@ typedef struct {
 typedef struct {
        char ssid[OEM_DEV_NAME_LEN+1];
        int freq;
+       int is_persistent;
        char pass[OEM_PASS_PHRASE_LEN+1];
        unsigned char go_dev_addr[OEM_MACADDR_LEN];
 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
index 11bfa94..57e62b5 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          wifi-direct-manager
 Summary:       Wi-Fi Direct manger
-Version:       1.2.162
+Version:       1.2.163
 Release:       1
 Group:      Network & Connectivity/Wireless
 License:    Apache-2.0
index a9a5567..e9b4088 100755 (executable)
@@ -924,6 +924,10 @@ void __ws_extract_group_details(const char *key, GVariant *value, void *user_dat
                        event->dev_role = WFD_OEM_DEV_ROLE_GO;
                else if (!strncmp(role, "client", 6))
                        event->dev_role = WFD_OEM_DEV_ROLE_GC;
+       } else if (g_strcmp0(key, "persistent") == 0) {
+               g_variant_get(value, "b", &group->is_persistent);
+               WDP_LOGD("Is Persistent : [%s]", group->is_persistent?"YES":"NO");
+
 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
        } else if (g_strcmp0(key, "IpAddr") == 0) {
 
index 8d99645..b1b14f1 100755 (executable)
@@ -283,6 +283,7 @@ typedef enum {
        WS_GROUP_INFO_PASS,     // passphrase=
        WS_GROUP_INFO_GO_DEV_ADDR,      // go_dev_addr=
        WS_GROUP_INFO_STATUS,           // status=
+       WS_GROUP_INFO_PERSISTENT,       // [PERSISTENT]
 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
        WS_GROUP_INFO_IP_ADDR,  //ip_addr=
        WS_GROUP_INFO_IP_MASK,  //ip_mask=
index 48ebc94..9f850a3 100755 (executable)
@@ -155,6 +155,7 @@ ws_string_s ws_group_info_strs[] = {
        {"passphrase", WS_GROUP_INFO_PASS},
        {"go_dev_addr", WS_GROUP_INFO_GO_DEV_ADDR},
        {"status", WS_GROUP_INFO_STATUS},
+       {"[PERSISTENT]", WS_GROUP_INFO_PERSISTENT},
 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
        {"ip_addr", WS_GROUP_INFO_IP_ADDR},
        {"ip_mask", WS_GROUP_INFO_IP_MASK},
@@ -1677,6 +1678,10 @@ static wfd_oem_group_data_s *_convert_msg_to_group_info(char *msg)
                        if (res < 0)
                                memset(edata->go_dev_addr, 0x00, OEM_MACADDR_LEN);
                        break;
+               case WS_GROUP_INFO_PERSISTENT:
+                       edata->is_persistent = TRUE;
+                       WDP_LOGD("Is Persistent : [%s]", edata->is_persistent?"YES":"NO");
+                       break;
 #ifdef TIZEN_FEATURE_IP_OVER_EAPOL
                case WS_GROUP_INFO_IP_ADDR:
                        WDP_LOGD("Extracted peer ip = %s", infos[i].string);