!60 sync patches from upstream to make RestartSec work

From: @licunlong 
Reviewed-by: @jiayi0118 
Signed-off-by: @jiayi0118
This commit is contained in:
openeuler-ci-bot 2023-08-25 06:15:54 +00:00 committed by Gitee
commit 699a4a07e6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From fe0b82ce77d6a825fdcf29099fe8e2f1bec296ec Mon Sep 17 00:00:00 2001
From: licunlong <licunlong1@huawei.com>
Date: Fri, 25 Aug 2023 10:32:23 +0800
Subject: [PATCH] fix: delete and re-add the restart timer to make timer work
again
---
core/coms/service/src/mng.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/core/coms/service/src/mng.rs b/core/coms/service/src/mng.rs
index 526b6373..f9051f65 100755
--- a/core/coms/service/src/mng.rs
+++ b/core/coms/service/src/mng.rs
@@ -1904,9 +1904,10 @@ impl RunningData {
if self.armd_timer() {
let timer = self.timer();
- events.set_enabled(timer.clone(), EventState::Off)?;
+ events.del_source(timer.clone())?;
timer.set_time(usec);
+ events.add_source(timer.clone())?;
events.set_enabled(timer, EventState::OneShot)?;
return Ok(0);
}
--
2.30.2

View File

@ -11,13 +11,15 @@
Name: sysmaster
Version: 0.2.5
Release: 1
Release: 2
Summary: redesign and reimplement process1.
License: Mulan PSL v2
URL: https://gitee.com/openeuler/sysmaster
Source0: %{name}-%{version}.tar.gz
Patch6001: backport-fix-delete-and-re-add-the-restart-timer-to-make-time.patch
ExclusiveArch: x86_64 aarch64
BuildRequires: rust
@ -69,6 +71,9 @@ install -Dm0640 -t %{buildroot}/etc/sysmaster %{conf_install_source}/system.conf
/etc/sysmaster/system.conf
%changelog
* Fri Aug 25 2023 licunlong<licunlong1@huawei.com> - 0.2.5-2
- sync patches from upstream
* Sat Aug 5 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.5-1
- update for compiling with rust 1.57