crm_debug_4("LRM: connect...");
do_lrm_control(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){	int ret = HA_OK;	if(action & A_LRM_DISCONNECT) {		if(fsa_lrm_conn) {			fsa_lrm_conn->lrm_ops->signoff(fsa_lrm_conn);		}		/* TODO: Clean up the hashtable */	}	if(action & A_LRM_CONNECT) {			crm_debug_4("LRM: connect...");		ret = HA_OK;				monitors = g_hash_table_new_full(			g_str_hash, g_str_equal,			g_hash_destroy_str, free_recurring_op);		resources = g_hash_table_new_full(			g_str_hash, g_str_equal,			g_hash_destroy_str, g_hash_destroy_str);				resources_confirmed = g_hash_table_new_full(			g_str_hash, g_str_equal,			g_hash_destroy_str, g_hash_destroy_str);				shutdown_ops = g_hash_table_new_full(			g_str_hash, g_str_equal,			g_hash_destroy_str, g_hash_destroy_str);				fsa_lrm_conn = ll_lrm_new(XML_CIB_TAG_LRM);			if(NULL == fsa_lrm_conn) {			register_fsa_error(C_FSA_INTERNAL, I_ERROR, NULL);			ret = HA_FAIL;		}		if(ret == HA_OK) {			crm_debug_4("LRM: sigon...");			ret = fsa_lrm_conn->lrm_ops->signon(				fsa_lrm_conn, CRM_SYSTEM_CRMD);		}				if(ret != HA_OK) {			if(++num_lrm_register_fails < max_lrm_register_fails) {				crm_warn("Failed to sign on to the LRM %d"					 " (%d max) times",					 num_lrm_register_fails,					 max_lrm_register_fails);								crm_timer_start(wait_timer);				crmd_fsa_stall(NULL);				return I_NULL;			}		}		if(ret == HA_OK) {			crm_debug_4("LRM: set_lrm_callback...");			ret = fsa_lrm_conn->lrm_ops->set_lrm_callback(				fsa_lrm_conn, lrm_op_callback);			if(ret != HA_OK) {				crm_err("Failed to set LRM callbacks");			}		}				if(ret != HA_OK) {			crm_err("Failed to sign on to the LRM %d"				" (max) times", num_lrm_register_fails);			register_fsa_error(C_FSA_INTERNAL, I_ERROR, NULL);			return I_NULL;		}		/* TODO: create a destroy handler that causes		 * some recovery to happen		 */		G_main_add_IPC_Channel(G_PRIORITY_LOW,			      fsa_lrm_conn->lrm_ops->ipcchan(fsa_lrm_conn),			      FALSE,			      lrm_dispatch,			      fsa_lrm_conn,			      default_ipc_connection_destroy);		set_bit_inplace(fsa_input_register, R_LRM_CONNECTED);			}		if(action & ~(A_LRM_CONNECT|A_LRM_DISCONNECT)) {		crm_err("Unexpected action %s in %s",		       fsa_action2string(action), __FUNCTION__);	}				return I_NULL;}