lrm_free_rsc(the_rsc);
build_active_RAs(crm_data_t *rsc_list){	GList *op_list  = NULL;	GList *lrm_list = NULL;	gboolean found_op = FALSE;	state_flag_t cur_state = 0;		if(fsa_lrm_conn == NULL) {		return FALSE;	}	lrm_list = fsa_lrm_conn->lrm_ops->get_all_rscs(fsa_lrm_conn);	slist_iter(		rid, char, lrm_list, lpc,		lrm_rsc_t *the_rsc =			fsa_lrm_conn->lrm_ops->get_rsc(fsa_lrm_conn, rid);		crm_data_t *xml_rsc = create_xml_node(			rsc_list, XML_LRM_TAG_RESOURCE);		int max_call_id = -1;				crm_debug("Processing lrm_rsc_t entry %s", rid);				if(the_rsc == NULL) {			crm_err("NULL resource returned from the LRM");			continue;		}		crm_xml_add(xml_rsc, XML_ATTR_ID, the_rsc->id);		crm_xml_add(xml_rsc, XML_ATTR_TYPE, the_rsc->type);		crm_xml_add(xml_rsc, XML_AGENT_ATTR_CLASS, the_rsc->class);		crm_xml_add(xml_rsc, XML_AGENT_ATTR_PROVIDER,the_rsc->provider);		op_list = the_rsc->ops->get_cur_state(the_rsc, &cur_state);		crm_debug_2("\tcurrent state:%s",			    cur_state==LRM_RSC_IDLE?"Idle":"Busy");		slist_iter(			op, lrm_op_t, op_list, llpc,			crm_debug_2("Processing op %s for %s (status=%d, rc=%d)", 				    op->op_type, the_rsc->id, op->op_status, op->rc);			if(max_call_id < op->call_id) {				build_operation_update(xml_rsc, op, __FUNCTION__, llpc);			} else if(max_call_id > op->call_id) {				crm_err("Bad call_id in list=%d. Previous call_id=%d",					op->call_id, max_call_id);			} else {				crm_debug("Skipping duplicate entry for call_id=%d",					op->call_id);			}			max_call_id = op->call_id;			found_op = TRUE;						);		if(found_op == FALSE && g_list_length(op_list) != 0) {			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;}