MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / cib_apply_patch_event

Function cib_apply_patch_event

lib/cib/cib_utils.c:762–794  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

760}
761
762int
763cib_apply_patch_event(xmlNode *event, xmlNode *input, xmlNode **output, int level)
764{
765 int rc = pcmk_err_generic;
766
767 xmlNode *diff = NULL;
768
769 CRM_ASSERT(event);
770 CRM_ASSERT(input);
771 CRM_ASSERT(output);
772
773 crm_element_value_int(event, F_CIB_RC, &rc);
774 diff = get_message_xml(event, F_CIB_UPDATE_RESULT);
775
776 if (rc < pcmk_ok || diff == NULL) {
777 return rc;
778 }
779
780 if (level > LOG_CRIT) {
781 log_cib_diff(level, diff, "Config update");
782 }
783
784 if (input != NULL) {
785 rc = cib_process_diff(NULL, cib_none, NULL, NULL, diff, input, output, NULL);
786
787 if (rc != pcmk_ok) {
788 crm_debug("Update didn't apply: %s", pcmk_strerror(rc));
789 return rc;
790 }
791 }
792
793 return rc;
794}
795
796gboolean
797cib_internal_config_changed(xmlNode * diff)

Callers 1

crm_diff_updateFunction · 0.85

Calls 5

crm_element_value_intFunction · 0.85
get_message_xmlFunction · 0.85
log_cib_diffFunction · 0.85
cib_process_diffFunction · 0.85
pcmk_strerrorFunction · 0.85

Tested by

no test coverage detected