xml_rsc, XML_LRM_ATTR_OPCODE, tmp);
xml_rsc, XML_LRM_ATTR_OPSTATUS, tmp);
build_active_RAs(xmlNodePtr rsc_list){	int lpc = 0, llpc = 0;	GList *op_list  = NULL;	GList *lrm_list = NULL;	gboolean found_op = FALSE;			state_flag_t cur_state = 0;	const char *this_op    = NULL;	char *tmp = NULL;		lrm_list = fsa_lrm_conn->lrm_ops->get_all_rscs(fsa_lrm_conn);	slist_iter(		rid, char, lrm_list, lpc,/* 		GHashTable* 	params; */		lrm_rsc_t *the_rsc =			fsa_lrm_conn->lrm_ops->get_rsc(fsa_lrm_conn, rid);				xmlNodePtr xml_rsc = create_xml_node(			rsc_list, XML_LRM_TAG_RESOURCE);		crm_info("Processing lrm_rsc_t entry %s", rid);				if(the_rsc == NULL) {			crm_err("NULL resource returned from the LRM");			continue;		}		set_xml_property_copy(xml_rsc, XML_ATTR_ID, the_rsc->id);		set_xml_property_copy(			xml_rsc, XML_LRM_ATTR_TARGET, fsa_our_uname);		op_list = the_rsc->ops->get_cur_state(the_rsc, &cur_state);		crm_verbose("\tcurrent state:%s\n",			    cur_state==LRM_RSC_IDLE?"Idle":"Busy");		slist_iter(			op, lrm_op_t, op_list, llpc,			this_op = op->op_type;			crm_debug("Processing op %s for %s (status=%d, rc=%d)", 				  op->op_type, the_rsc->id, op->op_status, op->rc);						if(op->rc != 0			   || safe_str_neq(this_op, CRMD_RSCSTATE_MON)){				set_xml_property_copy(					xml_rsc,					XML_LRM_ATTR_RSCSTATE,					op->user_data);						set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_LASTOP, this_op);					tmp = crm_itoa(op->rc);				set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_RCCODE, tmp);				crm_free(tmp);				tmp = crm_itoa(op->op_status);				set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_OPCODE, tmp);				crm_free(tmp);								/* we only want the last one */				found_op = TRUE;				break;			} else {				set_xml_property_copy(					xml_rsc,					XML_LRM_ATTR_RSCSTATE,					CRMD_RSCSTATE_START_OK);						set_xml_property_copy(					xml_rsc,					XML_LRM_ATTR_LASTOP,					CRMD_RSCSTATE_START);					tmp = crm_itoa(op->rc);				set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_RCCODE, tmp);				crm_free(tmp);				set_xml_property_copy(					xml_rsc, XML_LRM_ATTR_OPCODE, "0");				/* we only want the last one */				found_op = TRUE;				break;			}			);		if(found_op == FALSE) {			crm_err("Could not properly determin last op"				" for %s from %d entries", the_rsc->id,				g_list_length(op_list));		}		g_list_free(op_list);		);	g_list_free(lrm_list);	return TRUE;}