crm_devel("Registering with CCM");
crm_debug_3("Registering with CCM");
do_ccm_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; 	int	 fsa_ev_fd; 	gboolean did_fail = FALSE;		if(action & A_CCM_DISCONNECT){		oc_ev_unregister(fsa_ev_token);	}	if(action & A_CCM_CONNECT) {		crm_devel("Registering with CCM");		ret = oc_ev_register(&fsa_ev_token);		if (ret != 0) {			crm_warn("CCM registration failed");			did_fail = TRUE;		}		if(did_fail == FALSE) {			crm_devel("Setting up CCM callbacks");			ret = oc_ev_set_callback(fsa_ev_token, OC_EV_MEMB_CLASS,						 crmd_ccm_msg_callback, NULL);			if (ret != 0) {				crm_warn("CCM callback not set");				did_fail = TRUE;			}		}		if(did_fail == FALSE) {			oc_ev_special(fsa_ev_token, OC_EV_MEMB_CLASS, 0/*don't care*/);						crm_devel("Activating CCM token");			ret = oc_ev_activate(fsa_ev_token, &fsa_ev_fd);			if (ret != 0){				crm_warn("CCM Activation failed");				did_fail = TRUE;			}		}		if(did_fail) {			num_ccm_register_fails++;			oc_ev_unregister(fsa_ev_token);						if(num_ccm_register_fails < max_ccm_register_fails) {				crm_warn("CCM Connection failed"					 " %d times (%d max)",					 num_ccm_register_fails,					 max_ccm_register_fails);								crm_timer_start(wait_timer);				crmd_fsa_stall(NULL);				return I_NULL;							} else {				crm_err("CCM Activation failed %d (max) times",					num_ccm_register_fails);				register_fsa_error(C_FSA_INTERNAL, I_FAIL, NULL);				return I_NULL;			}		}				crm_info("CCM Activation passed... all set to go!");		G_main_add_fd(G_PRIORITY_HIGH, fsa_ev_fd, FALSE, ccm_dispatch,			      fsa_ev_token,			      default_ipc_connection_destroy);			}	if(action & ~(A_CCM_CONNECT|A_CCM_DISCONNECT)) {		crm_err("Unexpected action %s in %s",		       fsa_action2string(action), __FUNCTION__);	}		return I_NULL;}