From afff118d65ed2025921408235af65e78ca97cb32 Mon Sep 17 00:00:00 2001 From: Bhaskar Dutta Date: Tue, 21 Aug 2018 14:50:57 +0530 Subject: [PATCH] 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 --- src/connection_profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- 2.7.4