  if(safe_str_eq(section, XML_CIB_TAG_CRMCONFIG)) { tag = NULL;  } else if(safe_str_eq(section, XML_CIB_TAG_NODES)) { tag = XML_CIB_TAG_NODE;  } else if(safe_str_eq(section, XML_CIB_TAG_STATUS)) { xml_next = find_entity(xml_obj, XML_CIB_TAG_STATE, node_uuid); tag = XML_TAG_TRANSIENT_NODEATTRS;  } else { return cib_NOSECTION; }  
read_attr(cib_t *the_cib,	  const char *section, const char *node_uuid, const char *set_name,	  const char *attr_id, const char *attr_name, char **attr_value){	const char *tag = NULL;	enum cib_errors rc = cib_ok;	crm_data_t *a_node = NULL;	crm_data_t *xml_obj = NULL;	crm_data_t *xml_next = NULL;	crm_data_t *fragment = NULL;	CRM_ASSERT(attr_value != NULL);	*attr_value = NULL;	crm_debug("Searching for attribute %s (section=%s, node=%s, set=%s)",		  attr_name, section, crm_str(node_uuid), crm_str(set_name));	if(safe_str_eq(section, XML_CIB_TAG_CRMCONFIG)) {		tag = NULL;			} else if(safe_str_eq(section, XML_CIB_TAG_NODES)) {		tag = XML_CIB_TAG_NODE;			} else if(safe_str_eq(section, XML_CIB_TAG_STATUS)) {		tag = XML_CIB_TAG_STATE;	} else {		return cib_NOSECTION;	}		rc = the_cib->cmds->query(		the_cib, section, &fragment, cib_sync_call);	if(rc != cib_ok) {		crm_err("Query failed for attribute %s (section=%s, node=%s, set=%s): %s",			attr_name, section, crm_str(set_name), crm_str(node_uuid),			cib_error2string(rc));		return rc;	}		a_node = find_xml_node(fragment, XML_TAG_CIB, TRUE);	xml_obj = get_object_root(section, a_node);	CRM_ASSERT(xml_obj != NULL);	crm_log_xml_debug_2(xml_obj, "Result section");		if(tag != NULL) {		xml_next = find_entity(xml_obj, tag, node_uuid);		if(xml_next == NULL) {			crm_debug("%s=%s not found in %s", tag, node_uuid,				  crm_element_name(xml_obj));			return cib_NOTEXISTS;		}		xml_obj = xml_next;	}	if(set_name != NULL) {		xml_next = find_entity(xml_obj, XML_TAG_ATTR_SETS, set_name);		if(xml_next == NULL) {			crm_debug("%s=%s object not found in %s",				  XML_TAG_ATTR_SETS, set_name,				  crm_element_name(xml_obj));			return cib_NOTEXISTS;		}		xml_obj = xml_next;		xml_next = find_xml_node(xml_obj, XML_TAG_ATTRS, TRUE);		if(xml_next == NULL) {			crm_debug("%s object not found in %s",				  XML_TAG_ATTRS, crm_element_name(xml_obj));			return cib_NOTEXISTS;		}		xml_obj = xml_next;	}	xml_next = NULL;	xml_child_iter(		xml_obj, a_child, XML_CIB_TAG_NVPAIR,		const char *name = crm_element_value(			a_child, XML_NVPAIR_ATTR_NAME);		if(attr_id != NULL		   && safe_str_neq(attr_id, ID(a_child))) {			continue;					} else if(attr_name != NULL			  && safe_str_neq(attr_name, name)) {			continue;		}		xml_next = a_child;		break;		);		if(xml_next == NULL) {		crm_debug("<%s id=%s name=%s/> not found in %s",			  XML_CIB_TAG_NVPAIR, attr_id, attr_name,			  crm_element_name(xml_obj));		return cib_NOTEXISTS;	}	xml_obj = xml_next;		if(crm_element_value(xml_obj, XML_NVPAIR_ATTR_VALUE) != NULL) {		*attr_value = crm_element_value_copy(			xml_obj, XML_NVPAIR_ATTR_VALUE);	}		free_xml(fragment);	return cib_ok;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/0aeaa1d9f77db488f2e49e48c83ca41435a0ff8e/cib_attrs.c/clean/lib/crm/cib/cib_attrs.c