Fix a bug related to the onboot timer setting 24/294524/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 20 Jun 2023 22:42:59 +0000 (22:42 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 20 Jun 2023 22:42:59 +0000 (22:42 +0000)
Before setting the onboot timer, the launchpad checks whether the loader context
was prepared or not. Unfortunately, the touched flag was not set.
This patch add the flag set in the Prepare() method.

Change-Id: Id6be61426bb2d3d2a86f350a159900ae41e890a5
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/loader_context.cc

index 84fa007..729a7a3 100644 (file)
@@ -225,6 +225,7 @@ pid_t LoaderContext::Prepare() {
     SetLiveTimer();
 
   MemoryMonitor::GetInst().Reset();
+  touched_ = true;
   return pid_;
 }
 
@@ -453,7 +454,6 @@ gboolean LoaderContext::OnBootTimeoutCb(gpointer user_data) {
   _W("Loader(%d:%s) is starting by the on-boot timer option",
       context->GetType(), context->GetLoaderName().c_str());
   context->Prepare();
-  context->touched_ = true;
   return G_SOURCE_REMOVE;
 }