GSListPtr nodes, GSListPtr rsc_list, GSListPtr *node_constraints)
GListPtr nodes, GListPtr rsc_list, GListPtr *node_constraints)
unpack_status(xmlNodePtr status,	      GSListPtr nodes,	      GSListPtr rsc_list,	      GSListPtr *node_constraints){	crm_verbose("Begining unpack");	while(status != NULL) {		const char *id        = xmlGetProp(			status, XML_ATTR_ID);		const char *state     = xmlGetProp(			status, XML_LRM_ATTR_STATE);		const char *exp_state = xmlGetProp(			status, XML_CIB_ATTR_EXPSTATE);		const char *join_state = xmlGetProp(			status, XML_CIB_ATTR_JOINSTATE);//		const char *crm_state = xmlGetProp(//			status, XML_CIB_ATTR_CRMDSTATE);		const char *ccm_state = xmlGetProp(			status, XML_CIB_ATTR_INCCM);		const char *shutdown  = xmlGetProp(			status, XML_CIB_ATTR_SHUTDOWN);		const char *unclean   = xmlGetProp(			status, XML_CIB_ATTR_STONITH);				xmlNodePtr lrm_state  = find_xml_node(status, XML_CIB_TAG_LRM);		xmlNodePtr attrs      = find_xml_node(status, "attributes");		lrm_state = find_xml_node(lrm_state, XML_LRM_TAG_RESOURCES);		lrm_state = find_xml_node(lrm_state, "lrm_resource");		status = status->next;		crm_verbose("Processing node %s", id);		if(id == NULL){			// error			continue;		}		crm_verbose("Processing node attrs");				node_t *this_node = pe_find_node(nodes, id);		if(this_node == NULL) {			crm_err("Node %s in status section no longer exists",				id);			continue;		}				while(attrs != NULL){			const char *name  = xmlGetProp(				attrs, XML_NVPAIR_ATTR_NAME);			const char *value = xmlGetProp(				attrs, XML_NVPAIR_ATTR_VALUE);						if(name != NULL && value != NULL			   && safe_val(NULL, this_node, details) != NULL) {				crm_verbose("Adding %s => %s", name, value);				g_hash_table_insert(this_node->details->attrs,						    crm_strdup(name),						    crm_strdup(value));			}			attrs = attrs->next;		}		crm_verbose("determining node state");				if(safe_str_eq(join_state, CRMD_JOINSTATE_MEMBER)		   && safe_str_eq(ccm_state, XML_BOOLEAN_YES)		   && shutdown == NULL) {			// process resource, make +ve preference			this_node->details->online = TRUE;		} else {			crm_verbose("remove");			// remove node from contention			this_node->weight = -1;			this_node->fixed = TRUE;			crm_verbose("state %s, expected %s, shutdown %s",			       state, exp_state, shutdown);			if(unclean != NULL) {				this_node->details->unclean = TRUE;							} else if(shutdown != NULL) {				this_node->details->shutdown = TRUE;			} else if(safe_str_eq(exp_state, CRMD_STATE_ACTIVE)				  && safe_str_eq(					  join_state, CRMD_JOINSTATE_DOWN)				){				// mark unclean in the xml				this_node->details->unclean = TRUE;			}			if(this_node->details->unclean) {				crm_verbose("Node %s is due for STONITH", id);			}			if(this_node->details->shutdown) {				crm_verbose("Node %s is due for shutdown", id);			}		}		crm_verbose("Processing node lrm state");		process_node_lrm_state(this_node, lrm_state,				       rsc_list,  nodes,				       node_constraints);	}	return TRUE;	}