check return value from vconf 80/178080/1 accepted/tizen/unified/20180511.073944 submit/tizen/20180510.125405
authorWonnam Jang <wn.jang@samsung.com>
Tue, 8 May 2018 05:24:57 +0000 (14:24 +0900)
committerWonnam Jang <wn.jang@samsung.com>
Tue, 8 May 2018 05:24:57 +0000 (14:24 +0900)
Change-Id: I87bcf1a84f30763710f112cb5da1451b6dda6dec
Signed-off-by: Wonnam Jang <wn.jang@samsung.com>
server/ttsd_network.c

index 748a345..0706364 100644 (file)
@@ -32,7 +32,11 @@ bool ttsd_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, tts_tag(), "[Network] Fail to get network status, ret(%d)", ret);
+               return false;
+       }
 
        if (network_status == VCONFKEY_NETWORK_OFF) {
                SLOG(LOG_WARN, tts_tag(), "[Network] Current network connection is OFF.");
@@ -42,4 +46,4 @@ bool ttsd_network_is_connected()
        SLOG(LOG_DEBUG, tts_tag(), "[Network] Network status is %d", network_status);
 
        return true;
-}
\ No newline at end of file
+}