Removed emulator state check
[platform/core/connectivity/stc-manager.git] / src / stc-manager.c
old mode 100755 (executable)
new mode 100644 (file)
index d83f079..436ee29
@@ -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"
@@ -176,7 +175,7 @@ int stc_commit_iptables(char *cmd, int *err_num, char **err_str)
        if (pid == 0) {
                errno = 0;
                if (execv(args[0], args) == -1) {
-                       STC_LOGE("Failed to execute [%s]", err_str);
+                       STC_LOGE("Failed to execute [%s]", *err_str);
                        g_strfreev(args);
                        exit(-1);
                }
@@ -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);