From d695f7f9ad071e11b1dd27e1087ce02b913dd0be Mon Sep 17 00:00:00 2001 From: Wonnam Jang Date: Tue, 8 May 2018 14:22:42 +0900 Subject: [PATCH] check return value from vconf Change-Id: Ie79376aa6da42cb8a200b0fb10df65e30b2175ea Signed-off-by: Wonnam Jang --- common/stt_network.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/stt_network.c b/common/stt_network.c index 8538e80..e8e6535 100644 --- a/common/stt_network.c +++ b/common/stt_network.c @@ -33,7 +33,11 @@ bool stt_network_is_connected() { /* Check network */ int network_status = 0; - vconf_get_int(VCONFKEY_NETWORK_STATUS, &network_status); + int ret = vconf_get_int(VCONFKEY_NETWORK_STATUS, &network_status); + if (0 != ret) { + SLOG(LOG_WARN, stt_tag(), "[Network] Fail to get network status, ret(%d)", ret); + return false; + } if (network_status == VCONFKEY_NETWORK_OFF) { SLOG(LOG_WARN, stt_tag(), "[Network] Current network connection is OFF."); @@ -43,4 +47,4 @@ bool stt_network_is_connected() SLOG(LOG_DEBUG, stt_tag(), "[Network] Network status is %d", network_status); return true; -} \ No newline at end of file +} -- 2.7.4