Update vconf for IPv6 address 69/118169/1 accepted/tizen/common/20170313.162430 accepted/tizen/ivi/20170313.042637 accepted/tizen/mobile/20170313.042548 accepted/tizen/tv/20170313.042606 accepted/tizen/unified/20170313.042702 accepted/tizen/wearable/20170313.042622 submit/tizen/20170313.001510
authorSeonah Moon <seonah1.moon@samsung.com>
Thu, 9 Mar 2017 05:30:17 +0000 (14:30 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Thu, 9 Mar 2017 05:30:36 +0000 (14:30 +0900)
Change-Id: I933ab794c03fe7f2b59ddf81d6b36245895f4edf
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/net-config.spec
src/network-state.c

index c5ca245..00717c1 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          net-config
 Summary:       TIZEN Network Configuration service
-Version:       1.1.101
+Version:       1.1.102
 Release:       2
 Group:         System/Network
 License:       Apache-2.0
index 37706cc..1a6b775 100755 (executable)
@@ -457,7 +457,7 @@ static void __netconfig_update_default_connection_info(void)
        if (profile == NULL)
                DBG("Reset network state configuration");
        else
-               DBG("%s: ip(%s) proxy(%s)", profile, ip_addr, proxy_addr);
+               DBG("%s: ip(%s) ip6(%s) proxy(%s)", profile, ip_addr, ip_addr6, proxy_addr);
 
        netconfig_vconf_get_int(VCONFKEY_NETWORK_STATUS, &old_network_status);
 
@@ -474,6 +474,7 @@ static void __netconfig_update_default_connection_info(void)
 
        } else if (profile != NULL) {
                char *old_ip = vconf_get_str(VCONFKEY_NETWORK_IP);
+               char *old_ip6 = vconf_get_str(VCONFKEY_NETWORK_IP6);
                char *old_proxy = vconf_get_str(VCONFKEY_NETWORK_PROXY);
 
                if (netconfig_is_wifi_profile(profile) == TRUE) {
@@ -510,13 +511,19 @@ static void __netconfig_update_default_connection_info(void)
                if (g_strcmp0(old_ip, ip_addr) != 0 || old_ip == NULL) {
                        if (ip_addr != NULL)
                                netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, ip_addr);
-                       else if (ip_addr6 != NULL)
-                               netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, ip_addr6);
                        else
                                netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, "");
                }
                g_free(old_ip);
 
+               if (g_strcmp0(old_ip6, ip_addr6) != 0 || old_ip6 == NULL) {
+                       if (ip_addr6 != NULL)
+                               netconfig_set_vconf_str(VCONFKEY_NETWORK_IP6, ip_addr6);
+                       else
+                               netconfig_set_vconf_str(VCONFKEY_NETWORK_IP6, "");
+               }
+               g_free(old_ip6);
+
                if (g_strcmp0(old_proxy, proxy_addr) != 0) {
                        if (proxy_addr == NULL)
                                netconfig_set_vconf_str(VCONFKEY_NETWORK_PROXY, "");