const char *unclean    = NULL;/*crm_element_value(node_state,XML_CIB_ATTR_STONITH); */  if(safe_str_eq(join_state, CRMD_JOINSTATE_MEMBER) && crm_is_true(ccm_state) && (ha_state == NULL || safe_str_eq(ha_state, ACTIVESTATUS)) && safe_str_eq(crm_state, ONLINESTATUS) && shutdown == NULL) { if(this_node != NULL) { this_node->details->online = TRUE; } 
 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) { 
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);	const char *unclean    = NULL;/*crm_element_value(node_state,XML_CIB_ATTR_STONITH); */		if(safe_str_eq(join_state, CRMD_JOINSTATE_MEMBER)	   && crm_is_true(ccm_state)	   && (ha_state == NULL || safe_str_eq(ha_state, ACTIVESTATUS))	   && safe_str_eq(crm_state, ONLINESTATUS)	   && shutdown == NULL) {		if(this_node != NULL) {			this_node->details->online = TRUE;		}		crm_debug("Node %s is online", uname);		online = TRUE;			} else if(this_node != NULL) {		/* remove node from contention */		this_node->weight = -1;		this_node->fixed = TRUE;		crm_verbose("join_state=%s, expected=%s, shutdown=%s",			    crm_str(join_state), crm_str(exp_state),			    crm_str(shutdown));		if(unclean != NULL) {			this_node->details->unclean = TRUE;						} else if(is_node_unclean(node_state)) {			/* report and or take remedial action */			this_node->details->unclean = TRUE;		}				if(shutdown != NULL) {			this_node->details->shutdown = 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;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/7b6dd88477748c9719715ce9ba6b9918f12415f9/unpack.c/buggy/crm/pengine/unpack.c