DBG("Old IPv4.Address [%s] Received new IPv4.Address [%s]", old_ip, value);
if (g_strcmp0(old_ip, value) != 0) {
- if (value == NULL && strlen(old_ip) > 0)
- vconf_set_str(VCONFKEY_NETWORK_IP, "");
- else
+ if (value != NULL)
vconf_set_str(VCONFKEY_NETWORK_IP, value);
+ else if (old_ip != NULL && strlen(old_ip) > 0)
+ vconf_set_str(VCONFKEY_NETWORK_IP, "");
}
free(old_ip);
}
DBG("Old IPv6.Address [%s] Received new IPv6.Address [%s]", old_ip6, value);
if (g_strcmp0(old_ip6, value) != 0) {
- if (value == NULL && strlen(old_ip6) > 0)
- vconf_set_str(VCONFKEY_NETWORK_IP6, "");
- else
+ if (value != NULL)
vconf_set_str(VCONFKEY_NETWORK_IP6, value);
+ else if (old_ip6 != NULL && strlen(old_ip6) > 0)
+ vconf_set_str(VCONFKEY_NETWORK_IP6, "");
}
free(old_ip6);
}