check return value from vconf 79/178079/1 accepted/tizen/unified/20180511.073942 submit/tizen/20180510.125405
authorWonnam Jang <wn.jang@samsung.com>
Tue, 8 May 2018 05:22:42 +0000 (14:22 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Tue, 8 May 2018 05:22:42 +0000 (14:22 +0900)
Change-Id: Ie79376aa6da42cb8a200b0fb10df65e30b2175ea
Signed-off-by: Wonnam Jang <wn.jang@samsung.com>
common/stt_network.c

index 8538e80..e8e6535 100644 (file)
@@ -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
+}