crm_debug("Removing leaf: <%s id=%s>",object_name, object_id);
crm_debug("Removing leaf: <%s id=%s>", crm_str(object_name), crm_str(object_id));
delete_cib_object(crm_data_t *parent, crm_data_t *delete_spec){	const char *object_name = NULL;	const char *object_id = NULL;	crm_data_t *equiv_node = NULL;	int result = cib_ok;		if(delete_spec != NULL) {		object_name = crm_element_name(delete_spec);	}	object_id = crm_element_value(delete_spec, XML_ATTR_ID);	crm_debug_2("Processing: <%s id=%s>", object_name, object_id);		if(delete_spec == NULL) {		result = cib_NOOBJECT;	} else if(parent == NULL) {		result = cib_NOPARENT;	} else if(object_id == NULL) {		/*  placeholder object */		equiv_node = find_xml_node(parent, object_name, FALSE);			} else {		equiv_node = find_entity(parent, object_name, object_id);	}	if(result != cib_ok) {		; /* nothing */			} else if(equiv_node == NULL) {		result = cib_NOTEXISTS;	} else if(xml_has_children(delete_spec) == FALSE) {		/*  only leaves are deleted */		crm_debug("Removing leaf: <%s id=%s>",object_name, object_id);		zap_xml_from_parent(parent, equiv_node);	} else {		xml_child_iter(			delete_spec, child, NULL,			int tmp_result = delete_cib_object(equiv_node, child);						/*  only the first error is likely to be interesting */			if(result == cib_ok) {				result = tmp_result;			}			);	}	return result;}