this_node->weight = -1; this_node->fixed = TRUE;
determine_online_status(crm_data_t * node_state, node_t *this_node){	gboolean online = FALSE;	const char *uname      = crm_element_value(node_state,XML_ATTR_UNAME);/*	const char *state      = crm_element_value(node_state,XML_NODE_ATTR_STATE); */	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 *ccm_state  = crm_element_value(node_state,XML_CIB_ATTR_INCCM);	const char *ha_state   = crm_element_value(node_state,XML_CIB_ATTR_HASTATE);	const char *shutdown   = crm_element_value(node_state,XML_CIB_ATTR_SHUTDOWN);	if(this_node == NULL) {		return online;	}	if(shutdown != NULL) {		this_node->details->shutdown = TRUE;	}	if(safe_str_eq(join_state, CRMD_JOINSTATE_MEMBER)) {		this_node->details->expected_up = TRUE;	}	if(crm_is_true(ccm_state) == FALSE	   || ha_state == NULL	   || safe_str_eq(ha_state, DEADSTATUS)) {		crm_debug("Node is down: ha_state=%s, ccm_state=%s",			  crm_str(ha_state), crm_str(ccm_state));	} else if(safe_str_eq(join_state, CRMD_JOINSTATE_MEMBER)		  && safe_str_eq(crm_state, ONLINESTATUS)) {		online = TRUE;	} else if(this_node->details->expected_up == FALSE) {		crm_debug("CRMd is down: ha_state=%s, ccm_state=%s",			  crm_str(ha_state), crm_str(ccm_state));		crm_debug("\tcrm_state=%s, join_state=%s, expected=%s",			  crm_str(crm_state), crm_str(join_state),			  crm_str(exp_state));			} else {		/* mark it unclean */		this_node->details->unclean = TRUE;		crm_warn("Node %s is un-expectedly down", uname);		crm_debug("\tcrm_state=%s, join_state=%s, expected=%s",			  crm_str(crm_state), crm_str(join_state),			  crm_str(exp_state));	}	if(online) {		crm_debug("Node %s is online", uname);		this_node->details->online = TRUE;	} else {		/* remove node from contention */		crm_debug("Node %s is down", uname);		this_node->weight = -1;		this_node->fixed = TRUE;	}	if(this_node->details->unclean) {		crm_warn("Node %s is unclean", uname);	}	if(this_node->details->shutdown) {		crm_debug("Node %s is due for shutdown", uname);	}		return online;}