[TSAM-12832] Empty IP and proxy string on emulator
[platform/core/connectivity/net-config.git] / src / network-state.c
index 9987d1f..37706cc 100755 (executable)
@@ -446,8 +446,13 @@ static void __netconfig_update_default_connection_info(void)
        const char *proxy_addr = netconfig_get_default_proxy();
        unsigned int freq = netconfig_get_default_frequency();
 
-       if (emulator_is_emulated() == TRUE)
+       if (emulator_is_emulated() == TRUE) {
+               if (ip_addr != NULL)
+                       netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, ip_addr);
+               else
+                       netconfig_set_vconf_str(VCONFKEY_NETWORK_IP, "");
                return;
+       }
 
        if (profile == NULL)
                DBG("Reset network state configuration");