rsc_cons_list = g_slist_sort(rsc_cons_list, sort_cons_strength);
unpack_status(xmlNodePtr status){	pdebug("Begining unpack %s", __FUNCTION__);	while(status != NULL) {		const char *id = xmlGetProp(status, "id");		const char *state = xmlGetProp(status, "state");		const char *exp_state = xmlGetProp(status, "exp_state");		xmlNodePtr lrm_state = find_xml_node(status, "lrm");		xmlNodePtr attrs = find_xml_node(status, "attributes");		lrm_state = find_xml_node(lrm_state, "lrm_resources");		lrm_state = find_xml_node(lrm_state, "rsc_state");		status = status->next;		pdebug("Processing node %s", id);		if(id == NULL){			// error			continue;		}		pdebug("Processing node attrs");				node_t *this_node = pe_find_node(node_list, id);		while(attrs != NULL){			const char *name = xmlGetProp(attrs, "name");			const char *value = xmlGetProp(attrs, "value");						if(name != NULL && value != NULL			   && safe_val(NULL, this_node, details) != NULL) {				pdebug("Adding %s => %s",					      name, value);				g_hash_table_insert(this_node->details->attrs,						    cl_strdup(name),						    cl_strdup(value));			}			attrs = attrs->next;		}		pdebug("determining node state");				if(safe_str_eq(exp_state, "active")		   && safe_str_eq(state, "active")) {			// process resource, make +ve preference			this_node->details->online = TRUE;					} else {			pdebug("remove %s", __FUNCTION__);			// remove node from contention			this_node->weight = -1;			this_node->fixed = TRUE;			pdebug("state %s, expected %s",				      state, exp_state);						if(safe_str_eq(state, "shutdown")){				// create shutdown req				shutdown_list = g_slist_append(shutdown_list,							       this_node);			} else if(safe_str_eq(exp_state, "active")				  && safe_str_neq(state, "active")) {				// mark unclean in the xml				state = "unclean";				this_node->details->unclean = TRUE;								// remove any running resources from being allocated			}      			if(safe_str_eq(state, "unclean")) {				stonith_list = g_slist_append(stonith_list,							      this_node);			}		}		pdebug("Processing node lrm state");		process_node_lrm_state(this_node, lrm_state);			}	// node_cons_list too?	rsc_cons_list = g_slist_sort(rsc_cons_list, sort_cons_strength);	return TRUE;	}