fsa_dump_queue(LOG_DEBUG); return;
if(data == NULL) { set_bit_inplace(fsa_actions, with_actions); with_actions = A_NOTHING; return; } crm_err("%s stalled the FSA with data - this may be broken", raised_from);
register_fsa_input_adv(	enum crmd_fsa_cause cause, enum crmd_fsa_input input,	void *data, long long with_actions,	gboolean prepend, const char *raised_from){	unsigned  old_len = g_list_length(fsa_message_queue);	fsa_data_t *fsa_data = NULL;	crm_debug("%s raised FSA input %s (cause=%s) %s data",		  raised_from,fsa_input2string(input),		  fsa_cause2string(cause), data?"with":"without");		if(input == I_WAIT_FOR_EVENT) {		do_fsa_stall = TRUE;		set_bit_inplace(fsa_actions, with_actions);		with_actions = A_NOTHING;		crm_debug("Stalling the FSA pending further input");		if(old_len > 0) {			crm_err("Stalling the FSA with pending inputs");		}		fsa_dump_queue(LOG_DEBUG);		return;	}	if(old_len == 0) {		last_was_vote = FALSE;	}		if(input == I_NULL && with_actions == A_NOTHING /* && data == NULL */){		/* no point doing anything */		crm_err("Cannot add entry to queue: no input and no action");		return;			} else if(data == NULL) {		last_was_vote = FALSE;	} else if(last_was_vote && cause == C_HA_MESSAGE && input == I_ROUTER) {		const char *op = cl_get_string(			((ha_msg_input_t*)data)->msg, F_CRM_TASK);		if(safe_str_eq(op, CRM_OP_VOTE)) {			/* It is always safe to treat N successive votes as			 *    a single one			 *			 * If all the discarded votes are more "loosing" than			 *    the first then the result is accurate			 *    (win or loose).			 *			 * If any of the discarded votes are less "loosing" 			 *    than the first then we will cast our vote and the			 *    eventual winner will vote us down again (which			 *    even in the case that N=2, is no worse than if we			 *    had not disarded the vote).			 */			crm_verbose("Vote compression: %d", old_len);			return;		}	} else if (cause == C_HA_MESSAGE && input == I_ROUTER) {		const char *op = cl_get_string(			((ha_msg_input_t*)data)->msg, F_CRM_TASK);		if(safe_str_eq(op, CRM_OP_VOTE)) {			last_was_vote = TRUE;			crm_devel("Added vote: %d", old_len);		}	} else {		last_was_vote = FALSE;	}	crm_malloc0(fsa_data, sizeof(fsa_data_t));	fsa_data->id        = ++last_data_id;	fsa_data->fsa_input = input;	fsa_data->fsa_cause = cause;	fsa_data->origin    = raised_from;	fsa_data->data      = NULL;	fsa_data->data_type = fsa_dt_none;	fsa_data->actions   = with_actions;	if(with_actions != A_NOTHING) {		crm_devel("Adding actions %.16llx to input", with_actions);	}		if(data != NULL) {		switch(cause) {			case C_FSA_INTERNAL:			case C_CRMD_STATUS_CALLBACK:			case C_IPC_MESSAGE:			case C_HA_MESSAGE:				crm_devel("Copying %s data from %s as a HA msg",					  fsa_cause2string(cause),					  raised_from);				fsa_data->data = copy_ha_msg_input(data);				fsa_data->data_type = fsa_dt_ha_msg;				break;							case C_LRM_OP_CALLBACK:				crm_devel("Copying %s data from %s as lrm_op_t",					  fsa_cause2string(cause),					  raised_from);				fsa_data->data = copy_lrm_op((lrm_op_t*)data);				fsa_data->data_type = fsa_dt_lrm;				break;							case C_CCM_CALLBACK:				crm_devel("Copying %s data from %s as CCM data",					  fsa_cause2string(cause),					  raised_from);				fsa_data->data = copy_ccm_data(data);				fsa_data->data_type = fsa_dt_ccm;				break;			case C_SUBSYSTEM_CONNECT:			case C_LRM_MONITOR_CALLBACK:			case C_TIMER_POPPED:			case C_SHUTDOWN:			case C_HEARTBEAT_FAILED:			case C_HA_DISCONNECT:			case C_ILLEGAL:			case C_UNKNOWN:			case C_STARTUP:				crm_err("Copying %s data (from %s)"					" not yet implemented",					fsa_cause2string(cause), raised_from);				exit(1);				break;		}		crm_trace("%s data copied",			  fsa_cause2string(fsa_data->fsa_cause));	}		/* make sure to free it properly later */	if(prepend) {		crm_trace("Prepending input");		fsa_message_queue = g_list_prepend(fsa_message_queue, fsa_data);	} else {		crm_trace("Appending input");		fsa_message_queue = g_list_append(fsa_message_queue, fsa_data);	}		crm_debug("Queue len: %d -> %d", old_len,		  g_list_length(fsa_message_queue));	fsa_dump_queue(LOG_DEBUG);		if(old_len == g_list_length(fsa_message_queue)){		crm_err("Couldnt add message to the queue");	}	if(fsa_source) {		G_main_set_trigger(fsa_source);	}}