send_request(NULL, fragment, CRM_OP_UPDATE,
send_request(NULL, fragment, CRM_OP_CIB_UPDATE,
do_update_resource(lrm_rsc_t *rsc, lrm_op_t* op){/*  <status>  <nodes_status id=uname>  <lrm>  <lrm_resources>  <lrm_resource id=>  </...>*/	xmlNodePtr update, iter;	char *tmp = NULL;	xmlNodePtr fragment;	int len = 0;	char *fail_state = NULL;	if(op == NULL || rsc == NULL) {		crm_err("Either resouce or op was not specified");		return;	}		update = create_xml_node(NULL, XML_CIB_TAG_STATE);	set_uuid(update, XML_ATTR_UUID, fsa_our_uname);	set_xml_property_copy(update,  XML_ATTR_UNAME, fsa_our_uname);	iter = create_xml_node(update, XML_CIB_TAG_LRM);	iter = create_xml_node(iter,   XML_LRM_TAG_RESOURCES);	iter = create_xml_node(iter,   "lrm_resource");		set_xml_property_copy(iter, XML_ATTR_ID, rsc->id);	set_xml_property_copy(iter, XML_LRM_ATTR_LASTOP, op->op_type);	len = strlen(op->op_type);	len += strlen("_failed_");	crm_malloc(fail_state, sizeof(char)*len);	if(fail_state != NULL) {		sprintf(fail_state, "%s_failed", op->op_type);	}		switch(op->op_status) {		case LRM_OP_CANCELLED:			break;		case LRM_OP_ERROR:		case LRM_OP_TIMEOUT:		case LRM_OP_NOTSUPPORTED:			crm_err("An LRM operation failed"					" or was aborted");			set_xml_property_copy(				iter, XML_LRM_ATTR_RSCSTATE, fail_state);			break;		case LRM_OP_DONE:			set_xml_property_copy(				iter, XML_LRM_ATTR_RSCSTATE,				op->user_data);			break;	}	crm_free(fail_state);		tmp = crm_itoa(op->rc);	set_xml_property_copy(iter, XML_LRM_ATTR_RC, tmp);	crm_free(tmp);	tmp = crm_itoa(op->op_status);	set_xml_property_copy(iter, XML_LRM_ATTR_OPSTATUS, tmp);	crm_free(tmp);	set_xml_property_copy(iter, XML_LRM_ATTR_TARGET, fsa_our_uname);		fragment = create_cib_fragment(update, NULL);	send_request(NULL, fragment, CRM_OP_UPDATE,		     fsa_our_dc, CRM_SYSTEM_DCIB, NULL);		free_xml(fragment);	free_xml(update);}