Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
pacemaker.8750
pacemaker-libcib-correctly-search-for-v2-patchs...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-libcib-correctly-search-for-v2-patchset-changes.patch of Package pacemaker.8750
commit b986acbe131216aaa372681e97dfc0f2ef8f70ad Author: Ken Gaillot <kgaillot@redhat.com> Date: Tue Jun 13 16:03:36 2017 -0500 Low: libcib: correctly search for v2 patchset changes cib_internal_config_changed() was never updated for v2 patch format diff --git a/lib/cib/cib_utils.c b/lib/cib/cib_utils.c index 8aeed6750..f639ada7c 100644 --- a/lib/cib/cib_utils.c +++ b/lib/cib/cib_utils.c @@ -794,23 +794,24 @@ cib_apply_patch_event(xmlNode * event, xmlNode * input, xmlNode ** output, int l return rc; } +/* v2 and v2 patch formats */ +#define XPATH_CONFIG_CHANGE \ + "//" XML_CIB_TAG_CRMCONFIG " | " \ + "//" XML_DIFF_CHANGE "[contains(@" XML_DIFF_PATH ",'/" XML_CIB_TAG_CRMCONFIG "/')]" + gboolean -cib_internal_config_changed(xmlNode * diff) +cib_internal_config_changed(xmlNode *diff) { gboolean changed = FALSE; - xmlXPathObject *xpathObj = NULL; - if (diff == NULL) { - return FALSE; - } + if (diff) { + xmlXPathObject *xpathObj = xpath_search(diff, XPATH_CONFIG_CHANGE); - xpathObj = xpath_search(diff, "//" XML_CIB_TAG_CRMCONFIG); - if (numXpathResults(xpathObj) > 0) { - changed = TRUE; + if (numXpathResults(xpathObj) > 0) { + changed = TRUE; + } + freeXpathObject(xpathObj); } - - freeXpathObject(xpathObj); - return changed; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor