wifi-manager: Don't set NULL ProfileName in request_table for hidden AP 52/113552/2
authorSaurav Babu <saurav.babu@samsung.com>
Wed, 8 Feb 2017 06:09:40 +0000 (11:39 +0530)
committertaesub kim <taesub.kim@samsung.com>
Thu, 16 Feb 2017 06:44:13 +0000 (22:44 -0800)
In case of hidden AP connection, AP is not yet scanned so no profile
name exists. This patch sets the group name of hidden AP created using
ssid, mode and security as ProfileName in request_table.
Previous to this patch NULL was set as ProfileName in request_table and
prof_info variable was updated to contain last AP in profile_list  and connection
was initiated for that last AP instead of hidden AP.

Change-Id: I152565240206a2783e9df48f4064eec3afe33cc2
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/network_dbus.c

index 8957ffd3b003ae676bfa2b63c9f22e821c2a3ed1..be73a9771803e2bf1f50469aaed955f585879481 100755 (executable)
@@ -1171,16 +1171,9 @@ int _net_dbus_connect_service(const net_wifi_connect_service_info_t *wifi_connec
                                wifi_connection_info->mode,
                                wifi_connection_info->security);
 
-               for (list = profile_list; list; list = list->next) {
-                       prof_info = (net_profile_info_s *)list->data;
-                       if (g_strstr_len(prof_info->ProfileName,
-                                       NET_PROFILE_NAME_LEN_MAX+1, target_name) != NULL) {
-                               g_strlcpy(request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
-                                               prof_info->ProfileName, NET_PROFILE_NAME_LEN_MAX+1);
-
-                               break;
-                       }
-               }
+               WIFI_LOG(WIFI_INFO, "Hidden target name %s", target_name);
+               g_strlcpy(request_table[NETWORK_REQUEST_TYPE_OPEN_CONNECTION].ProfileName,
+                                 target_name, NET_PROFILE_NAME_LEN_MAX+1);
 
                g_free(target_name);
                //LCOV_EXCL_STOP