代码拉取完成,页面将自动刷新
From 12528cdf4d643aa304fd5aaf05ad62effd28b26a Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <[email protected]>
Date: Tue, 26 Nov 2024 12:29:35 +0100
Subject: [PATCH] Fix: sbd-inquisitor: avoid parsing SBD_DELAY_START as a time
duration if its value is boolean false
... to prevent the unnecessary call to crm_get_msec() and the warning
about an invalid value.
This addresses the issue brought up from:
https://github.com/ClusterLabs/pacemaker/pull/3643#pullrequestreview-2448716154
---
src/sbd-inquisitor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/sbd-inquisitor.c b/src/sbd-inquisitor.c
index 56fd8a8..4ec140d 100644
--- a/src/sbd-inquisitor.c
+++ b/src/sbd-inquisitor.c
@@ -988,9 +988,7 @@ int main(int argc, char **argv, char **envp)
value = get_env_option("SBD_DELAY_START");
if(value) {
- delay_start = crm_is_true(value);
-
- if (!delay_start) {
+ if (crm_str_to_boolean(value, (int *) &delay_start) != 1) {
delay = crm_get_msec(value) / 1000;
if (delay > 0) {
delay_start = true;
--
2.33.1.windows.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。