check return value from vconf
[platform/core/uifw/tts.git] / 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
+}