Removed emulator state check 14/187014/1
authorhyunuktak <hyunuk.tak@samsung.com>
Fri, 17 Aug 2018 08:03:56 +0000 (17:03 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Fri, 17 Aug 2018 08:03:58 +0000 (17:03 +0900)
Change-Id: I829ee400b71f86ff10a8d264b5b75aae4457ceb5
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/stc-manager.spec
src/monitor/include/stc-emulator.h [deleted file]
src/monitor/stc-emulator.c [deleted file]
src/stc-manager.c

index 7e20304..b227159 100644 (file)
@@ -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 (file)
index 8e06f7c..0000000
+++ /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 <glib.h>
-
-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 (file)
index 6ccbe4f..0000000
+++ /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 <stdio.h>
-#include <system_info.h>
-
-#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");
-}
-
index f0d7e57..436ee29 100644 (file)
@@ -18,7 +18,6 @@
 #include <errno.h>
 #include <sys/wait.h>
 #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);