/*
-* 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
#include <vconf.h>
#include "stt_network.h"
+#include "stt_defs.h"
-extern const char* stt_tag();
int stt_network_initialize()
{
{
/* 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
+}