cl_log(LOG_DEBUG, "Election winner should be %s (born_on=%d)", lowest_uname, lowest_bornon);
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;	unsigned int my_born = -1, your_born = -1;	int lpc = 0, my_index = -1, your_index = -1;	enum crmd_fsa_input election_result = I_NULL;	const char *vote_from = xmlGetProp(vote, XML_ATTR_HOSTFROM);	const char *lowest_uname = NULL;	int lowest_bornon = 0;		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);			}		lowest_uname = fsa_membership_copy->members[0].node_uname;	lowest_bornon = fsa_membership_copy->members[0].node_born_on;		for(; lpc < fsa_membership_copy->members_size; lpc++) {				const char *node_uname =			fsa_membership_copy->members[lpc].node_uname;		int this_born_on =			fsa_membership_copy->members[lpc].node_born_on;				if(node_uname == NULL) {			continue;		}				if(strcmp(vote_from, node_uname) == 0) {			your_born = this_born_on;			your_index = lpc;		} else if (strcmp(fsa_our_uname, node_uname) == 0) {			my_born = this_born_on;			my_index = lpc;		}				if(lowest_bornon > this_born_on) {			lowest_uname = node_uname;			lowest_bornon = this_born_on;					} else if(lowest_bornon == this_born_on			  && strcmp(lowest_uname, node_uname) > 0) {			lowest_uname = node_uname;			lowest_bornon = this_born_on;		}	}#if 0	cl_log(LOG_DEBUG, "%s (bornon=%d), our bornon (%d)",		   vote_from, your_born, my_born);	cl_log(LOG_DEBUG, "%s %s %s",	       fsa_our_uname,	       strcmp(fsa_our_uname, vote_from) < 0?"<":">=",	       vote_from);#endif	cl_log(LOG_DEBUG, "Election winner should be %s (born_on=%d)",	       lowest_uname, lowest_bornon);			if(lowest_uname != NULL && strcmp(lowest_uname, fsa_our_uname) == 0){		cl_log(LOG_DEBUG, "Election win: lowest born_on and uname");		election_result = I_ELECTION_DC;	} else if(your_born < my_born) {		cl_log(LOG_DEBUG, "Election fail: born_on");		we_loose = TRUE;	} else if(your_born == my_born		  && strcmp(fsa_our_uname, vote_from) > 0) {		cl_log(LOG_DEBUG, "Election fail: uname");		we_loose = TRUE;	} else {		CRM_DEBUG("We might win... we should vote (possibly again)");		election_result = I_DC_TIMEOUT;	}	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);}