Moved application ground status monitor to plugin.
[platform/core/connectivity/stc-manager.git] / src / stc-manager.c
index 1f856ef..cfee380 100755 (executable)
@@ -17,8 +17,6 @@
 #include <signal.h>
 #include "stc-manager.h"
 #include "stc-emulator.h"
-#include "stc-statistics.h"
-#include "stc-restriction.h"
 #include "stc-manager-gdbus.h"
 #include "stc-db.h"
 #include "counter.h"
@@ -27,6 +25,7 @@
 #include "helper-nfacct-rule.h"
 #include "stc-monitor.h"
 #include "stc-manager-plugin.h"
+#include "stc-app-lifecycle.h"
 
 static stc_s *g_stc = NULL;
 
@@ -42,7 +41,9 @@ static void __stc_manager_deinit(void)
        stc_monitor_deinit();
        stc_deinit_db_guard();
        stc_db_deinitialize();
+
        stc_manager_gdbus_deinit((gpointer)g_stc);
+       stc_app_lifecycle_monitor_deinit();
        stc_manager_plugin_deinit();
 
        STC_LOGI("stc manager deinitialized");
@@ -71,8 +72,9 @@ static stc_s *__stc_manager_init(void)
        if (err != STC_ERROR_NONE)
                goto handle_error;
 
-       stc_manager_gdbus_init((gpointer)stc);
        stc_manager_plugin_init();
+       stc_app_lifecycle_monitor_init();
+       stc_manager_gdbus_init((gpointer)stc);
 
        STC_LOGI("stc manager initialized");
        __STC_LOG_FUNC_EXIT__;
@@ -94,8 +96,6 @@ gint32 main(gint32 argc, gchar *argv[])
        GMainLoop *main_loop = NULL;
        gint32 ret = -1;
 
-       signal(SIGCHLD, SIG_IGN);
-
        STC_LOGI("Smart Traffic Control Manager");
 
        if (daemon(0, 0) != 0)