const char *uname      = xmlGetProp(node_state,XML_ATTR_UNAME); const char *exp_state  = xmlGetProp(node_state,XML_CIB_ATTR_EXPSTATE); const char *join_state = xmlGetProp(node_state,XML_CIB_ATTR_JOINSTATE); const char *crm_state  = xmlGetProp(node_state,XML_CIB_ATTR_CRMDSTATE); const char *ha_state  = xmlGetProp(node_state,XML_CIB_ATTR_HASTATE); const char *ccm_state  = xmlGetProp(node_state,XML_CIB_ATTR_INCCM);
const char *uname      = crm_element_value(node_state,XML_ATTR_UNAME); const char *exp_state  = crm_element_value(node_state,XML_CIB_ATTR_EXPSTATE); const char *join_state = crm_element_value(node_state,XML_CIB_ATTR_JOINSTATE); const char *crm_state  = crm_element_value(node_state,XML_CIB_ATTR_CRMDSTATE); const char *ha_state  = crm_element_value(node_state,XML_CIB_ATTR_HASTATE); const char *ccm_state  = crm_element_value(node_state,XML_CIB_ATTR_INCCM);
is_node_unclean(xmlNodePtr node_state){/*	const char *state      = xmlGetProp(node_state,XML_NODE_ATTR_STATE); */	const char *uname      = xmlGetProp(node_state,XML_ATTR_UNAME);	const char *exp_state  = xmlGetProp(node_state,XML_CIB_ATTR_EXPSTATE);	const char *join_state = xmlGetProp(node_state,XML_CIB_ATTR_JOINSTATE);	const char *crm_state  = xmlGetProp(node_state,XML_CIB_ATTR_CRMDSTATE);	const char *ha_state  = xmlGetProp(node_state,XML_CIB_ATTR_HASTATE);	const char *ccm_state  = xmlGetProp(node_state,XML_CIB_ATTR_INCCM);	if(safe_str_eq(exp_state, CRMD_STATE_INACTIVE)) {		crm_debug("Node %s is safely inactive", uname);		return FALSE;	/* do an actual calculation once STONITH is available */	} else if(safe_str_neq(exp_state, CRMD_JOINSTATE_DOWN)) {		if(safe_str_eq(crm_state, OFFLINESTATUS)		   || (ha_state != NULL && safe_str_eq(ha_state, DEADSTATUS))		   || safe_str_eq(join_state, CRMD_JOINSTATE_DOWN)		   || safe_str_eq(ccm_state, XML_BOOLEAN_NO)) {			crm_warn("Node %s is un-expectedly down", uname);			return TRUE;		}		crm_debug("Node %s: ha=%s, join=%s, crm=%s, ccm=%s",			  uname, ha_state, join_state, crm_state, ccm_state);	} else {		crm_debug("Node %s was expected to be down", uname);	}	return FALSE;}