if(your_node->node_born_on < our_node->node_born_on) {
if(is_set(fsa_input_register, R_SHUTDOWN)) { cl_log(LOG_DEBUG, "Election fail: we are shutting down"); we_loose = TRUE;  } else if(our_node == NULL) { cl_log(LOG_DEBUG, "Election fail: we dont exist in the CCM list"); we_loose = TRUE;  } else if(your_node == NULL) { cl_log(LOG_ERR, "The other side doesnt exist in the CCM list");  } else if(your_node->node_born_on < our_node->node_born_on) {
do_election_count_vote(long long action,		       enum crmd_fsa_cause cause,		       enum crmd_fsa_state cur_state,		       enum crmd_fsa_input current_input,		       void *data){	gboolean we_loose = FALSE;	xmlNodePtr vote = (xmlNodePtr)data;	enum crmd_fsa_input election_result = I_NULL;	const char *vote_from = xmlGetProp(vote, XML_ATTR_HOSTFROM);		FNIN();	if(vote_from == NULL || strcmp(vote_from, fsa_our_uname) == 0) {		// dont count our own vote		FNRET(election_result);	}	if(fsa_membership_copy->members_size < 1) {		// if even we are not in the cluster then we should not vote		FNRET(I_FAIL);			}	oc_node_t *our_node = (oc_node_t*)		g_hash_table_lookup(fsa_membership_copy->members, fsa_our_uname);	oc_node_t *your_node = (oc_node_t*)		g_hash_table_lookup(fsa_membership_copy->members, vote_from);#if 0	cl_log(LOG_DEBUG, "%s (bornon=%d), our bornon (%d)",		   vote_from, our_node->born, my_born);	cl_log(LOG_DEBUG, "%s %s %s",	       fsa_our_uname,	       strcmp(fsa_our_uname, vote_from) < 0?"<":">=",	       vote_from);#endif		if(your_node->node_born_on < our_node->node_born_on) {		cl_log(LOG_DEBUG, "Election fail: born_on");		we_loose = TRUE;	} else if(your_node->node_born_on == our_node->node_born_on		  && strcmp(fsa_our_uname, vote_from) > 0) {		cl_log(LOG_DEBUG, "Election fail: uname");		we_loose = TRUE;	} else {		struct election_data_s election_data;		election_data.winning_uname = NULL;		election_data.winning_bornon = -1; // maximum integer				CRM_DEBUG("We might win... we should vote (possibly again)");		election_result = I_DC_TIMEOUT; // new "default"		g_hash_table_foreach(fsa_membership_copy->members,				     ghash_count_vote, &election_data);				cl_log(LOG_DEBUG, "Election winner should be %s (born_on=%d)",		       election_data.winning_uname, election_data.winning_bornon);					if(safe_str_eq(election_data.winning_uname, fsa_our_uname)){			cl_log(LOG_DEBUG, "Election win: lowest born_on and uname");			election_result = I_ELECTION_DC;		}	}		if(we_loose) {		if(fsa_input_register & R_THE_DC) {			cl_log(LOG_DEBUG, "Give up the DC");			election_result = I_RELEASE_DC;					} else {			cl_log(LOG_DEBUG, "We werent the DC anyway");			election_result = I_NOT_DC;					}	}	if(we_loose || election_result == I_ELECTION_DC) {		// cancel timer, its been decided		stopTimer(election_timeout);	}		FNRET(election_result);}