From: hyunuktak Date: Fri, 17 Aug 2018 08:03:56 +0000 (+0900) Subject: Removed emulator state check X-Git-Tag: accepted/tizen/unified/20180817.140843~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b158c5dc9ad4538d48b9571d7954b990079d7da;p=platform%2Fcore%2Fconnectivity%2Fstc-manager.git Removed emulator state check Change-Id: I829ee400b71f86ff10a8d264b5b75aae4457ceb5 Signed-off-by: hyunuktak --- diff --git a/packaging/stc-manager.spec b/packaging/stc-manager.spec index 7e20304..b227159 100644 --- a/packaging/stc-manager.spec +++ b/packaging/stc-manager.spec @@ -1,6 +1,6 @@ Name: stc-manager Summary: STC(Smart Traffic Control) manager -Version: 0.0.73 +Version: 0.0.74 Release: 0 Group: Network & Connectivity/Other License: Apache-2.0 diff --git a/src/monitor/include/stc-emulator.h b/src/monitor/include/stc-emulator.h deleted file mode 100644 index 8e06f7c..0000000 --- a/src/monitor/include/stc-emulator.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __STC_EMULATOR_H__ -#define __STC_EMULATOR_H__ - -#include - -gboolean stc_emulator_is_emulated(void); -void stc_emulator_check_environment(void); - -#endif /* __STC_EMULATOR_H__ */ diff --git a/src/monitor/stc-emulator.c b/src/monitor/stc-emulator.c deleted file mode 100644 index 6ccbe4f..0000000 --- a/src/monitor/stc-emulator.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -#include "stc-emulator.h" -#include "stc-manager-util.h" - -static gboolean stc_is_emulated = FALSE; - -static gboolean __stc_emulator_check_env(void) -{ - int ret; - char *model = NULL; - - ret = system_info_get_platform_string("tizen.org/system/model_name", &model); - if (ret != SYSTEM_INFO_ERROR_NONE) { - STC_LOGE("Failed to get system information(%d)", ret); //LCOV_EXCL_LINE - return FALSE; //LCOV_EXCL_LINE - } - - if (model && strncmp(model, "Emulator", strlen("Emulator")) == 0) { - g_free(model); //LCOV_EXCL_LINE - return TRUE; //LCOV_EXCL_LINE - } - - g_free(model); //LCOV_EXCL_LINE - return FALSE; //LCOV_EXCL_LINE -} - -gboolean stc_emulator_is_emulated(void) -{ - return stc_is_emulated; -} - -void stc_emulator_check_environment(void) -{ - stc_is_emulated = __stc_emulator_check_env(); - - STC_LOGD("Emulation environment : %s", - stc_is_emulated ? "It's emulated" : "Not emulated"); -} - diff --git a/src/stc-manager.c b/src/stc-manager.c index f0d7e57..436ee29 100644 --- a/src/stc-manager.c +++ b/src/stc-manager.c @@ -18,7 +18,6 @@ #include #include #include "stc-manager.h" -#include "stc-emulator.h" #include "stc-manager-gdbus.h" #include "stc-db.h" #include "counter.h" @@ -236,13 +235,11 @@ gint32 main(gint32 argc, gchar *argv[]) /* Crate the GLIB main loop */ main_loop = g_main_loop_new(NULL, FALSE); - stc_emulator_check_environment(); - if (stc_emulator_is_emulated() == FALSE) { - g_stc = __stc_manager_init(); - if (!g_stc) - goto fail; - g_stc->main_loop = main_loop; - } + g_stc = __stc_manager_init(); + if (!g_stc) + goto fail; + + g_stc->main_loop = main_loop; /* Run the main loop */ g_main_loop_run(main_loop); @@ -250,8 +247,7 @@ gint32 main(gint32 argc, gchar *argv[]) ret = 0; fail: - if (stc_emulator_is_emulated() == FALSE) - __stc_manager_deinit(); + __stc_manager_deinit(); if (main_loop) g_main_loop_unref(main_loop);