From: Saurav Babu Date: Wed, 8 Feb 2017 06:09:40 +0000 (+0530) Subject: wifi-manager: Don't set NULL ProfileName in request_table for hidden AP X-Git-Tag: submit/tizen/20170216.070237~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4955e8ba0bca42b378de88f00d0e926eeb42b3fb;p=platform%2Fcore%2Fapi%2Fwifi-manager.git wifi-manager: Don't set NULL ProfileName in request_table for hidden AP 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 --- diff --git a/src/network_dbus.c b/src/network_dbus.c index 8957ffd..be73a97 100755 --- a/src/network_dbus.c +++ b/src/network_dbus.c @@ -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