Suppose Device trying to connect with a wifi router which does not support IPV6. 65/187265/1
authorBhaskar Dutta <bhaskar.d@samsung.com>
Tue, 21 Aug 2018 09:20:57 +0000 (14:50 +0530)
committerBhaskar Dutta <bhaskar.d@samsung.com>
Tue, 21 Aug 2018 09:22:46 +0000 (14:52 +0530)
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 <bhaskar.d@samsung.com>
src/connection_profile.c

index d5e3bd8..cb631cf 100755 (executable)
@@ -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);
                }
        }