File pacemaker#3513-0001-Fix-libpacemaker-correctly-retrieve-any-existing-fai.patch of Package pacemaker.36842

From 5c29b675b8b44c23c623a7c87d0982f9f977ec42 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Wed, 5 Jun 2024 18:18:30 +0200
Subject: [PATCH] Fix: libpacemaker: correctly retrieve any existing fail-count
 for increment

The attribute name of an nvpair for this should be "value".

Regression introduced by ce3a9863df (not yet released).
---
 lib/pacemaker/pcmk_injections.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: pacemaker-2.1.7+20231219.0f7f88312/lib/pacemaker/pcmk_injections.c
===================================================================
--- pacemaker-2.1.7+20231219.0f7f88312.orig/lib/pacemaker/pcmk_injections.c
+++ pacemaker-2.1.7+20231219.0f7f88312/lib/pacemaker/pcmk_injections.c
@@ -114,7 +114,7 @@ pcmk__inject_failcount(pcmk__output_t *o
                             ID(cib_node), NULL, NULL, NULL, name,
                             NULL, &output) == pcmk_rc_ok) {
 
-        if (crm_element_value_int(output, name, &failcount) != 0) {
+        if (crm_element_value_int(output, XML_NVPAIR_ATTR_VALUE, &failcount) != 0) {
             failcount = 0;
         }
     }
openSUSE Build Service is sponsored by