auto handle = amd::AppStatusManager::GetInst().Find(pid);
if (handle != nullptr && !handle->SocketExists()) {
handle->SetStarting(true);
+ handle->UnsetStartupTimer();
handle->SetSocketExists(true);
handle->SetRealPID(pid);
builder.SetUid(uid);
builder.SetCallerPid(getpid());
builder.SetEventListener(this);
- AddAppInfo(std::shared_ptr<AppStatus>(builder.Build()));
+
+ app_status = std::shared_ptr<AppStatus>(builder.Build());
+ app_status->SetStarting(true);
+ AddAppInfo(std::move(app_status));
_noti_send(AMD_NOTI_MSG_APP_STATUS_APP_REGISTER_PID, pid, 0, app_info.get(),
nullptr);
}
void AppStatusManager::Insert(AppStatusPtr app_status) {
+ if (!app_status->IsStarting())
+ app_status->SetStartupTimer();
+
app_status_list_.push_back(app_status);
pid_map_[app_status->GetPID()] = app_status;
if (app_status == nullptr)
return nullptr;
- if (!app_status->IsStarting())
- app_status->SetStartupTimer();
-
_noti_send(AMD_NOTI_MSG_APP_STATUS_ADD, 0, 0, app_status.get(), nullptr);
app_status_dao_->UpdateAppStatus(app_status);
Insert(app_status);