From 769d9f84ccbff5b47058ca044a823a52c6fd89b6 Mon Sep 17 00:00:00 2001 From: Danny Jeongseok Seo Date: Thu, 19 Jul 2012 13:32:33 +0900 Subject: [PATCH] Check NULL: Wi-Fi technology state --- debian/changelog | 8 ++++++++ packaging/net-config.spec | 2 +- src/network-state.c | 6 ++++-- src/wifi-power.c | 10 ++++++++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 35d6a1c..c516927 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +net-config (0.1.82) unstable; urgency=low + + * Check NULL: Wi-Fi technology state + * Git: slp/pkgs/n/net-config + * Tag: net-config_0.1.82 + + -- Danny Jeongseok Seo Thu, 17 May 2012 16:20:17 +0900 + net-config (0.1.81) unstable; urgency=low * Revise private vconf key name diff --git a/packaging/net-config.spec b/packaging/net-config.spec index 24ef73a..3c4bba2 100644 --- a/packaging/net-config.spec +++ b/packaging/net-config.spec @@ -2,7 +2,7 @@ Name: net-config Summary: TIZEN Network Configuration Module -Version: 0.1.81 +Version: 0.1.82 Release: 1 Group: System/Network License: Apache License Version 2.0 diff --git a/src/network-state.c b/src/network-state.c index ffdaeb0..7986f9b 100644 --- a/src/network-state.c +++ b/src/network-state.c @@ -203,10 +203,12 @@ gboolean netconfig_iface_network_state_update_default_connection_info( __netconfig_pop_3g_alert_syspoppup(); } - if (g_str_equal(ip, ip_addr) != TRUE) + if (ip != NULL && ip_addr != NULL && + g_str_equal(ip, ip_addr) != TRUE) vconf_set_str(VCONFKEY_NETWORK_IP, ip_addr); - if (g_str_equal(proxy, proxy_addr) != TRUE) + if (proxy != NULL && proxy_addr != NULL && + g_str_equal(proxy, proxy_addr) != TRUE) vconf_set_str(VCONFKEY_NETWORK_PROXY, proxy_addr); vconf_set_int(VCONFKEY_NETWORK_CONFIGURATION_CHANGE_IND, 1); diff --git a/src/wifi-power.c b/src/wifi-power.c index 6edd88d..511fd7c 100644 --- a/src/wifi-power.c +++ b/src/wifi-power.c @@ -320,6 +320,11 @@ static gboolean __netconfig_wifi_try_to_load_driver(void) wifi_tech_state = netconfig_wifi_get_technology_state(); INFO("Wi-Fi technology state: %s", wifi_tech_state); + if (wifi_tech_state == NULL) { + DBG("Failed to get Wi-Fi technology state"); + continue; + } + if (g_str_equal(wifi_tech_state, "EnabledTechnologies") == TRUE) { netconfig_wifi_update_power_state(TRUE); @@ -351,6 +356,11 @@ static gboolean __netconfig_wifi_try_to_remove_driver(void) wifi_tech_state = netconfig_wifi_get_technology_state(); INFO("Wi-Fi technology state: %s", wifi_tech_state); + if (wifi_tech_state == NULL) { + DBG("Failed to get Wi-Fi technology state"); + continue; + } + if (g_str_equal(wifi_tech_state, "EnabledTechnologies") != TRUE) { netconfig_wifi_update_power_state(FALSE); -- 2.34.1