Update version (1.65.1)
[platform/core/uifw/stt.git] / common / stt_network.c
index dcecd94..fcd979d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
+*  Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
@@ -16,8 +16,8 @@
 #include <vconf.h>
 
 #include "stt_network.h"
+#include "stt_defs.h"
 
-extern const char* stt_tag();
 
 int stt_network_initialize()
 {
@@ -33,14 +33,18 @@ 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, TAG_STTCONFIG, "[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.");
+               SLOG(LOG_WARN, TAG_STTCONFIG, "[Network] Current network connection is OFF.");
                return false;
        }
 
-       SLOG(LOG_DEBUG, stt_tag(), "[Network] Network status is %d", network_status);
+       SLOG(LOG_DEBUG, TAG_STTCONFIG, "[Network] Network status is %d", network_status);
 
        return true;
-}
\ No newline at end of file
+}