if(safe_str_eq(op->op_type, CRMD_RSCSTATE_STOP)) { int rc = HA_OK; fsa_lrm_conn->lrm_ops->delete_rsc( fsa_lrm_conn, rsc->id); CRM_DEV_ASSERT(rc == HA_OK); }
do_lrm_event(long long action,	     enum crmd_fsa_cause cause,	     enum crmd_fsa_state cur_state,	     enum crmd_fsa_input cur_input,	     fsa_data_t *msg_data){	lrm_op_t* op = NULL;	lrm_rsc_t* rsc = NULL;	const char *last_op = NULL;		if(msg_data->fsa_cause != C_LRM_OP_CALLBACK) {		register_fsa_error(C_FSA_INTERNAL, I_FAIL, NULL);		return I_NULL;	}	op = fsa_typed_data(fsa_dt_lrm);		CRM_DEV_ASSERT(op != NULL);	CRM_DEV_ASSERT(op != NULL && op->rsc != NULL);	if(op == NULL || op->rsc == NULL) {		return I_NULL;	}	rsc = op->rsc;	if(op->op_status == LRM_OP_DONE && op->rc != EXECRA_OK) {		crm_warn("Mapping operation %d status with a rc=%d"			 " to status %d",			 op->op_status, op->rc, LRM_OP_ERROR);		op->op_status = LRM_OP_ERROR;	}	switch(op->op_status) {		case LRM_OP_PENDING:			/* this really shouldnt happen */			crm_err("LRM operation (%d) %s on %s::%s(%s):%s %s: %s",				op->call_id, op->op_type,				crm_str(rsc->class),				crm_str(rsc->type),				crm_str(rsc->provider),				crm_str(rsc->id),				op_status2text(op->op_status),				execra_code2string(op->rc));			break;		case LRM_OP_ERROR:			crm_err("LRM operation (%d) %s on %s::%s(%s):%s %s: %s",				op->call_id, op->op_type,				crm_str(rsc->class),				crm_str(rsc->type),				crm_str(rsc->provider),				crm_str(rsc->id),				op_status2text(op->op_status),				execra_code2string(op->rc));			crm_debug("Result: %s", op->output);			break;		case LRM_OP_CANCELLED:			crm_warn("LRM operation (%d) %s on %s::%s(%s):%s %s",				 op->call_id, op->op_type,				 crm_str(rsc->class),				 crm_str(rsc->type),				 crm_str(rsc->provider),				 crm_str(rsc->id),				 op_status2text(op->op_status));			return I_NULL;			break;		case LRM_OP_TIMEOUT:			last_op = g_hash_table_lookup(				resources, crm_strdup(rsc->id));			if(safe_str_eq(last_op, CRMD_RSCSTATE_STOP)			   && safe_str_eq(op->op_type, CRMD_RSCSTATE_MON)) {				crm_err("LRM sent a timed out %s operation _after_ it was cancelled",					op->op_type);				return I_NULL;			}			crm_err("LRM operation (%d) %s on %s::%s(%s):%s %s",				op->call_id, op->op_type,				crm_str(rsc->class),				crm_str(rsc->type),				crm_str(rsc->provider),				crm_str(rsc->id),				op_status2text(op->op_status));			break;		case LRM_OP_NOTSUPPORTED:			crm_err("LRM operation (%d) %s on %s::%s(%s):%s %s",				op->call_id, op->op_type,				crm_str(rsc->class),				crm_str(rsc->type),				crm_str(rsc->provider),				crm_str(rsc->id),				op_status2text(op->op_status));			break;		case LRM_OP_DONE:			crm_debug("LRM operation (%d) %s on %s::%s(%s):%s %s",				  op->call_id, op->op_type,				  crm_str(rsc->class),				  crm_str(rsc->type),				  crm_str(rsc->provider),				  crm_str(rsc->id),				  op_status2text(op->op_status));			break;	}	do_update_resource(rsc, op);	return I_NULL;}