GList* ops_iter = g_list_first(rsc_ops); if(ops_iter == NULL) continue;
while(NULL != node){ lrm_op_t* op = (lrm_op_t*)node->data; this_op = op->op_type;               if(this_op == NULL || strcmp(this_op, "status") != 0){  const char *status_text = "<unknown>"; switch(op->status) { case LRM_OP_DONE: status_text = "done"; break; case LRM_OP_CANCELLED: status_text = "cancelled"; break; case LRM_OP_TIMEOUT: status_text = "timeout"; break; case LRM_OP_NOTSUPPORTED: status_text = "not suported"; break; case LRM_OP_ERROR: status_text = "error"; break; }   set_xml_property_copy(xml_rsc, "op_result", status_text);
do_lrm_startup_query(void){	GList* lrm_list = NULL;	xmlNodePtr data = create_xml_node(NULL, "lrm");	xmlNodePtr agent_list = create_xml_node(data, "lrm_agents");		lrm_list = fsa_lrm_conn->lrm_ops->get_ra_supported(fsa_lrm_conn);	if (NULL != lrm_list) {		GList* element = g_list_first(lrm_list);		while (NULL != element) {			char *rsc_type = (char*)element->data;						xmlNodePtr agent =				create_xml_node(agent_list, "lrm_agent");						set_xml_property_copy(agent, "type", rsc_type);			/* we dont have these yet */			set_xml_property_copy(agent, "class", NULL);			set_xml_property_copy(agent, "version", NULL);						element = g_list_next(element);		}	}		g_list_free(lrm_list);	lrm_list = fsa_lrm_conn->lrm_ops->get_all_rscs(fsa_lrm_conn);	xmlNodePtr rsc_list = create_xml_node(data, "lrm_resources");	if (NULL != lrm_list) {		GList* element = g_list_first(lrm_list);		while (NULL != element) {			lrm_rsc_t *the_rsc = (lrm_rsc_t*)element->data;			/* 				const char*	ra_type; *//* 				GHashTable* 	params; */						xmlNodePtr xml_rsc =				create_xml_node(rsc_list, "rsc_state");						set_xml_property_copy(xml_rsc,					      "id",					      the_rsc->id);						set_xml_property_copy(xml_rsc,					      "rsc_id",					      the_rsc->name);						set_xml_property_copy(xml_rsc,					      "node_id",					      fsa_our_uname);						state_flag_t cur_state = 0;			GList *rsc_ops = the_rsc->ops->get_cur_state(				the_rsc, &cur_state);						if(rsc_ops == NULL)				continue;						GList* ops_iter = g_list_first(rsc_ops);			if(ops_iter == NULL)				continue;						set_xml_property_copy(xml_rsc,					      "rsc_op",					      (char*)ops_iter->data);						const char *cur_state_str = NULL;			switch(cur_state) {				case LRM_RSC_IDLE:					cur_state_str = "Idle";					break;				case LRM_RSC_BUSY:					cur_state_str = "Busy";					break;			}									set_xml_property_copy(xml_rsc,					      "op_result",					      cur_state_str);						element = g_list_next(element);		}	}	g_list_free(lrm_list);	return data;}