ack_nack = CRMD_JOINSTATE_DOWN; 
ack_nack = CRMD_STATE_INACTIVE; 
do_dc_join_req(long long action,	       enum crmd_fsa_cause cause,	       enum crmd_fsa_state cur_state,	       enum crmd_fsa_input current_input,	       fsa_data_t *msg_data){	crm_data_t *generation = NULL;	int join_id = -1;	gboolean ack_nack_bool = TRUE;	const char *ack_nack = CRMD_JOINSTATE_MEMBER;	ha_msg_input_t *join_ack = fsa_typed_data(fsa_dt_ha_msg);	const char *join_from = cl_get_string(join_ack->msg,F_CRM_HOST_FROM);	const char *ref       = cl_get_string(join_ack->msg,XML_ATTR_REFERENCE);		gpointer join_node =		g_hash_table_lookup(fsa_membership_copy->members, join_from);	crm_debug_3("2) Processing req from %s", join_from);		generation = join_ack->xml;	ha_msg_value_int(join_ack->msg, F_CRM_JOIN_ID, &join_id);	crm_log_xml_debug_2(max_generation_xml, "Max generation");	crm_log_xml_debug_2(generation, "Their generation");	if(join_node == NULL) {		crm_err("Node %s is not a member", join_from);		ack_nack_bool = FALSE;			} else if(generation == NULL) {		crm_err("Generation was NULL");		ack_nack_bool = FALSE;	} else if(join_id != current_join_id) {		crm_debug("Response from %s was for invalid join: %d vs. %d",			  join_from, join_id, current_join_id);		check_join_state(cur_state, __FUNCTION__);		return I_NULL;			} else if(max_generation_xml == NULL) {		max_generation_xml = copy_xml(generation);		max_generation_from = crm_strdup(join_from);	} else if(cib_compare_generation(max_generation_xml, generation) < 0) {		crm_debug("%s has a better generation number than"			  " the current max %s",			  join_from, max_generation_from);		crm_free(max_generation_from);		free_xml(max_generation_xml);				max_generation_from = crm_strdup(join_from);		max_generation_xml = copy_xml(join_ack->xml);	}	if(ack_nack_bool == FALSE) {		/* NACK this client */		ack_nack = CRMD_JOINSTATE_DOWN;		crm_err("2) NACK'ing node %s (ref %s)", join_from, ref);	} else {		crm_debug("2) Welcoming node %s after ACK (ref %s)",			  join_from, ref);	}		/* add them to our list of CRMD_STATE_ACTIVE nodes */	g_hash_table_insert(		integrated_nodes, crm_strdup(join_from), crm_strdup(ack_nack));	crm_debug_2("%u nodes have been integrated",		    g_hash_table_size(integrated_nodes));		g_hash_table_remove(welcomed_nodes, join_from);	if(check_join_state(cur_state, __FUNCTION__) == FALSE) {		/* dont waste time by invoking the PE yet; */		crm_debug_2("Still waiting on %d outstanding join acks",			    g_hash_table_size(welcomed_nodes));	}	return I_NULL;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/25185b5f5d97ad050ae4073cd72bb2c4efc5cefd/join_dc.c/buggy/crm/crmd/join_dc.c