||safe_str_eq(op->op_type, CRMD_RSCSTATE_START) || safe_str_eq(op->op_type, CRMD_RSCSTATE_STOP)) {
||safe_str_eq(op->op_type, CRMD_ACTION_START) || safe_str_eq(op->op_type, CRMD_ACTION_STOP)) {
build_operation_update(	crm_data_t *xml_rsc, lrm_op_t *op, const char *src, int lpc){	int len = 0;	char *tmp = NULL;	char *fail_state = NULL;	crm_data_t *xml_op = NULL;	CRM_DEV_ASSERT(op != NULL);	if(crm_assert_failed) {		return FALSE;	}	crm_info("%s: Updating resouce %s after %s %s op",		 src, op->rsc_id, op_status2text(op->op_status), op->op_type);	if(op->op_status == LRM_OP_CANCELLED) {		crm_debug("Ignoring cancelled op");		return TRUE;	}		xml_op = create_xml_node(xml_rsc, XML_LRM_TAG_RSC_OP);		if(op->interval <= 0	   ||safe_str_eq(op->op_type, CRMD_RSCSTATE_START)	   || safe_str_eq(op->op_type, CRMD_RSCSTATE_STOP)) {		set_xml_property_copy(xml_op, XML_ATTR_ID, op->op_type);	} else {		char *op_id = generate_op_key(			op->rsc_id, op->op_type, op->interval);		set_xml_property_copy(xml_op, XML_ATTR_ID, op_id);		crm_free(op_id);	}	set_xml_property_copy(xml_rsc, XML_LRM_ATTR_LASTOP, op->op_type);	set_xml_property_copy(xml_op,  XML_LRM_ATTR_TASK,   op->op_type);	set_xml_property_copy(xml_op,  "origin", src);	/* Handle recurring ops - infer last op_status */	if(op->op_status == LRM_OP_PENDING && op->interval > 0) {		if(op->rc == 0) {			crm_debug("Mapping pending operation to DONE");			op->op_status = LRM_OP_DONE;		} else {			crm_debug("Mapping pending operation to ERROR");			op->op_status = LRM_OP_ERROR;		}	}		switch(op->op_status) {		case LRM_OP_PENDING:			break;		case LRM_OP_CANCELLED:			crm_err("What to do here");			break;		case LRM_OP_ERROR:		case LRM_OP_TIMEOUT:		case LRM_OP_NOTSUPPORTED:			crm_debug("Resource action %s/%s failed: %d",				  op->rsc_id, op->op_type, op->op_status);			len = strlen(op->op_type);			len += strlen("_failed_");			crm_malloc0(fail_state, sizeof(char)*len);			if(fail_state != NULL) {				sprintf(fail_state, "%s_failed", op->op_type);			}			set_xml_property_copy(				xml_op, XML_LRM_ATTR_RSCSTATE, fail_state);			if(lpc == 0) {				set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_RSCSTATE,					fail_state);			}			crm_free(fail_state);			break;		case LRM_OP_DONE:			set_xml_property_copy(				xml_op, XML_LRM_ATTR_RSCSTATE,				op->user_data);			if(lpc == 0) {				set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_RSCSTATE,					op->user_data);			}			break;	}	tmp = crm_itoa(op->call_id);	set_xml_property_copy(xml_op,  XML_LRM_ATTR_CALLID, tmp);	crm_free(tmp);	/* set these on 'xml_rsc' too to make life easy for the TE */	tmp = crm_itoa(op->rc);	set_xml_property_copy(xml_op, XML_LRM_ATTR_RC, tmp);	set_xml_property_copy(xml_rsc, XML_LRM_ATTR_RC, tmp);	crm_free(tmp);	tmp = crm_itoa(op->op_status);	set_xml_property_copy(xml_op, XML_LRM_ATTR_OPSTATUS, tmp);	set_xml_property_copy(xml_rsc, XML_LRM_ATTR_OPSTATUS, tmp);	crm_free(tmp);	set_node_tstamp(xml_op);		return TRUE;}