if(found == FALSE && safe_str_neq(this_op, "status")){ switch(op->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; }
if(safe_str_neq(this_op, "status")){  set_xml_property_copy( xml_rsc, XML_LRM_ATTR_LASTOP, this_op);  tmp = crm_itoa(op->op_status); set_xml_property_copy( xml_rsc, XML_LRM_ATTR_OPCODE, tmp); crm_free(tmp);   break; }
build_active_RAs(xmlNodePtr rsc_list){	int lpc = 0, llpc = 0;	GList *op_list  = NULL;	GList *lrm_list = NULL;	state_flag_t cur_state = 0;	const char *this_op    = NULL;	gboolean found = FALSE;		lrm_list = fsa_lrm_conn->lrm_ops->get_all_rscs(fsa_lrm_conn);	slist_iter(		the_rsc, lrm_rsc_t, lrm_list, lpc,/* 		GHashTable* 	params; */				xmlNodePtr xml_rsc = create_xml_node(rsc_list, "rsc_state");		const char *status_text = "<unknown>";		crm_info("Processing lrm_rsc_t entry %p", the_rsc);				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, "type",      the_rsc->type);		set_xml_property_copy(xml_rsc, "class",     the_rsc->class);		set_xml_property_copy(xml_rsc, "node_id",   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;			if(found == FALSE && safe_str_neq(this_op, "status")){				switch(op->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;				}