} else if(compare_version(your_version, CRM_VERSION) > 0) { 
} else if(compare_version(your_version, CRM_VERSION) < 0) { 
do_election_count_vote(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){	gboolean we_loose = FALSE;	ha_msg_input_t *vote = fsa_typed_data(fsa_dt_ha_msg);	enum crmd_fsa_input election_result = I_NULL;	const char *vote_from    = cl_get_string(vote->msg, F_CRM_HOST_FROM);	const char *your_version = cl_get_string(vote->msg, F_CRM_VERSION);	oc_node_t *our_node = NULL, * your_node = NULL;	if(vote_from == NULL || strcmp(vote_from, fsa_our_uname) == 0) {		/* dont count our own vote */		return election_result;	}	if(fsa_membership_copy == NULL) {		/* if the membership copy is NULL we REALLY shouldnt be voting		 * the question is how we managed to get here.		 */		crm_err("Membership copy was NULL");		return I_NULL;			} else if(fsa_membership_copy->members != NULL) {		our_node = (oc_node_t*)			g_hash_table_lookup(fsa_membership_copy->members,fsa_our_uname);		your_node = (oc_node_t*)			g_hash_table_lookup(fsa_membership_copy->members,vote_from);	}		if(your_node == NULL) {		crm_debug("Election ignore: The other side doesnt exist in CCM.");		return I_NULL;				/* if your_version == 0, then they're shutting down too */	} else if(is_set(fsa_input_register, R_SHUTDOWN)) {		if(your_version != NULL) {			crm_info("Election fail: we are shutting down");			we_loose = TRUE;					} else {			/* pretend nothing happened, they want to shutdown too*/			crm_info("Election ignore: they are shutting down too");			return I_NULL;		}			} else if(our_node == NULL		|| fsa_membership_copy->last_event == OC_EV_MS_EVICTED) {		crm_info("Election fail: we dont exist in CCM");		we_loose = TRUE;			} else if(your_version == NULL) {		crm_info("Election pass: they are shutting down");	} else if(compare_version(your_version, CRM_VERSION) > 0) {		crm_debug("Election fail: version");		we_loose = TRUE;			} else if(compare_version(your_version, CRM_VERSION) < 0) {		crm_debug("Election pass: version");			} else if(your_node->node_born_on < our_node->node_born_on) {		crm_debug("Election fail: born_on");		we_loose = TRUE;	} else if(your_node->node_born_on > our_node->node_born_on) {		crm_debug("Election pass: born_on");			} else if(strcmp(fsa_our_uname, vote_from) > 0) {		crm_debug("Election fail: uname");		we_loose = TRUE;/* cant happen... *	} else if(strcmp(fsa_our_uname, vote_from) == 0) { * * default... *	} else { // strcmp(fsa_our_uname, vote_from) < 0 *		we win */	}	if(we_loose) {		crm_timer_stop(election_timeout);		crm_debug("Election lost to %s", vote_from);		if(fsa_input_register & R_THE_DC) {			crm_debug_3("Give up the DC to %s", vote_from);			election_result = I_RELEASE_DC;					} else {			crm_debug_3("We werent the DC anyway");			election_result = I_PENDING;					}	} else {		if(cur_state == S_PENDING) {			crm_debug("Election ignore: We already lost the election");			return I_NULL;					} else {			crm_info("Election won over %s", vote_from);			election_result = I_ELECTION;		}	}		register_fsa_input(C_FSA_INTERNAL, election_result, NULL);	return I_NULL;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/02b7cf7175930d8c632b977ea22d0aa4f0bd3584/election.c/buggy/crm/crmd/election.c