From: Bhaskar Dutta Date: Tue, 21 Aug 2018 09:20:57 +0000 (+0530) Subject: Suppose Device trying to connect with a wifi router which does not support IPV6. X-Git-Tag: accepted/tizen/5.0/unified/20181102.013201^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afff118d65ed2025921408235af65e78ca97cb32;p=platform%2Fcore%2Fapi%2Fconnection.git Suppose Device trying to connect with a wifi router which does not support IPV6. In that Case __profile_convert_ip_to_string() function will be called for IPV6 address family and if net_info->IpAddr is passed as 1st argument, sometime garbage ip like "c0a8:5::" could be set to output variable ip_address(passed by Application). Change-Id: I3695f3720653c6b2b96d4766b27dfb17da44ccc2 Signed-off-by: Bhaskar Dutta --- diff --git a/src/connection_profile.c b/src/connection_profile.c index d5e3bd8..cb631cf 100755 --- a/src/connection_profile.c +++ b/src/connection_profile.c @@ -578,7 +578,7 @@ EXPORT_API int connection_profile_get_ip_address(connection_profile_h profile, } else { if (net_get_preferred_ipv6_address(net_info->ProfileName, ip_address) != NET_ERR_NONE) { CONNECTION_LOG(CONNECTION_ERROR, "Failed to get preferred ipv6 address"); - *ip_address = __profile_convert_ip_to_string(&net_info->IpAddr, + *ip_address = __profile_convert_ip_to_string(&net_info->IpAddr6, address_family); } }