fsa_input_register = 0;
do_startup(long long action,	   enum crmd_fsa_cause cause,	   enum crmd_fsa_state cur_state,	   enum crmd_fsa_input current_input,	   void *data){	int was_error = 0;	int interval = 1; /* seconds between DC heartbeats */	fsa_input_register = 0; /* zero out the regester */		crm_info("Register PID");	register_pid(PID_FILE, FALSE, crm_shutdown);		ipc_clients = g_hash_table_new(&g_str_hash, &g_str_equal);		if(was_error == 0) {		crm_info("Init server comms");		was_error = init_server_ipc_comms(			CRM_SYSTEM_CRMD, crmd_client_connect,			default_ipc_input_destroy);	}		/* set up the timers */	crm_malloc(dc_heartbeat, sizeof(fsa_timer_t));	crm_malloc(integration_timer, sizeof(fsa_timer_t));	crm_malloc(finalization_timer, sizeof(fsa_timer_t));	crm_malloc(election_trigger, sizeof(fsa_timer_t));	crm_malloc(election_timeout, sizeof(fsa_timer_t));	crm_malloc(shutdown_escalation_timmer, sizeof(fsa_timer_t));	interval = interval * 1000;	if(election_trigger != NULL) {		election_trigger->source_id = -1;		election_trigger->period_ms = -1;		election_trigger->fsa_input = I_DC_TIMEOUT;		election_trigger->callback = timer_popped;	} else {		was_error = TRUE;	}		if(dc_heartbeat != NULL) {		dc_heartbeat->source_id = -1;		dc_heartbeat->period_ms = -1;		dc_heartbeat->fsa_input = I_NULL;		dc_heartbeat->callback = do_dc_heartbeat;	} else {		was_error = TRUE;	}		if(election_timeout != NULL) {		election_timeout->source_id = -1;		election_timeout->period_ms = -1;		election_timeout->fsa_input = I_ELECTION_DC;		election_timeout->callback = timer_popped;	} else {		was_error = TRUE;	}		if(integration_timer != NULL) {		integration_timer->source_id = -1;		integration_timer->period_ms = -1;		integration_timer->fsa_input = I_INTEGRATION_TIMEOUT;		integration_timer->callback = timer_popped;	} else {		was_error = TRUE;	}		if(finalization_timer != NULL) {		finalization_timer->source_id = -1;		finalization_timer->period_ms = -1;		finalization_timer->fsa_input = I_FINALIZATION_TIMEOUT;		finalization_timer->callback = timer_popped;	} else {		was_error = TRUE;	}		if(shutdown_escalation_timmer != NULL) {		shutdown_escalation_timmer->source_id = -1;		shutdown_escalation_timmer->period_ms = -1;		shutdown_escalation_timmer->fsa_input = I_TERMINATE;		shutdown_escalation_timmer->callback = timer_popped;	} else {		was_error = TRUE;	}		/* set up the sub systems */	crm_malloc(cib_subsystem, sizeof(struct crm_subsystem_s));	crm_malloc(te_subsystem,  sizeof(struct crm_subsystem_s));	crm_malloc(pe_subsystem,  sizeof(struct crm_subsystem_s));	if(cib_subsystem != NULL) {		cib_subsystem->pid = 0;			cib_subsystem->path = crm_strdup(BIN_DIR);		cib_subsystem->name = crm_strdup(CRM_SYSTEM_CIB);		cib_subsystem->command = BIN_DIR"/cib";		cib_subsystem->flag = R_CIB_CONNECTED;		} else {		was_error = TRUE;	}		if(te_subsystem != NULL) {		te_subsystem->pid = 0;			te_subsystem->path = crm_strdup(BIN_DIR);		te_subsystem->name = crm_strdup(CRM_SYSTEM_TENGINE);		te_subsystem->command = BIN_DIR"/tengine";		te_subsystem->flag = R_TE_CONNECTED;		} else {		was_error = TRUE;	}		if(pe_subsystem != NULL) {		pe_subsystem->pid = 0;			pe_subsystem->path = crm_strdup(BIN_DIR);		pe_subsystem->name = crm_strdup(CRM_SYSTEM_PENGINE);		pe_subsystem->command = BIN_DIR"/pengine";		pe_subsystem->flag = R_PE_CONNECTED;		} else {		was_error = TRUE;	}	if(was_error)		return I_FAIL;		return I_NULL;}