stopTimer(election_timeout);
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;	xmlNodePtr vote = (xmlNodePtr)msg_data->data;	enum crmd_fsa_input election_result = I_NULL;	const char *vote_from    = xmlGetProp(vote, XML_ATTR_HOSTFROM);	const char *your_version = get_xml_attr(		vote, XML_TAG_OPTIONS, XML_ATTR_VERSION, TRUE);	oc_node_t *our_node = NULL, * your_node = NULL;	struct election_data_s election_data;	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_size < 1) {				/* if even we are not in the cluster then we should not vote */		return I_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(is_set(fsa_input_register, R_SHUTDOWN)) {		crm_debug("Election fail: we are shutting down");		we_loose = TRUE;	} else if(our_node == NULL) {		crm_debug("Election fail: we dont exist in the CCM list");		we_loose = TRUE;			} else if(your_node == NULL) {		crm_err("The other side doesnt exist in the CCM list");			} else if(compare_version(your_version, CRM_VERSION) > 0) {		crm_debug("Election fail: version");		we_loose = TRUE;			} 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		  && strcmp(fsa_our_uname, vote_from) > 0) {		crm_debug("Election fail: uname");		we_loose = TRUE;	} else {		election_data.winning_uname = NULL;		election_data.winning_bornon = -1; /* maximum integer */				crm_trace("We might win... we should vote (possibly again)");		election_result = I_ELECTION; /* new "default" */	}		if(we_loose) {		fsa_cib_conn->cmds->set_slave(fsa_cib_conn, cib_scope_local);		if(fsa_input_register & R_THE_DC) {			crm_debug("Give up the DC");			election_result = I_RELEASE_DC;					} else {			crm_debug("We werent the DC anyway");			election_result = I_PENDING;					}	}	return election_result;}