event_node   = xmlGetProp(event, XML_LRM_ATTR_TARGET); event_action = xmlGetProp(event, XML_LRM_ATTR_LASTOP); event_rsc    = xmlGetProp(event, XML_ATTR_ID); event_rc     = xmlGetProp(event, XML_LRM_ATTR_RC); rsc_state    = xmlGetProp(event, XML_LRM_ATTR_RSCSTATE); op_status    = xmlGetProp(event, XML_LRM_ATTR_OPSTATUS); 
event_node   = crm_element_value(event, XML_LRM_ATTR_TARGET); event_action = crm_element_value(event, XML_LRM_ATTR_LASTOP); event_rsc    = crm_element_value(event, XML_ATTR_ID); event_rc     = crm_element_value(event, XML_LRM_ATTR_RC); rsc_state    = crm_element_value(event, XML_LRM_ATTR_RSCSTATE); op_status    = crm_element_value(event, XML_LRM_ATTR_OPSTATUS); 
match_graph_event(action_t *action, xmlNodePtr event){	const char *allow_fail  = NULL;	const char *this_action = NULL;	const char *this_node   = NULL;	const char *this_rsc    = NULL;	const char *event_node;	const char *event_rsc;	const char *rsc_state;	const char *event_action;	const char *event_rc;	const char *op_status;		action_t *match = NULL;	int op_status_i = -3;	if(event == NULL) {		crm_trace("Ignoring NULL event");		return -1;	}		event_node   = xmlGetProp(event, XML_LRM_ATTR_TARGET);	event_action = xmlGetProp(event, XML_LRM_ATTR_LASTOP);	event_rsc    = xmlGetProp(event, XML_ATTR_ID);	event_rc     = xmlGetProp(event, XML_LRM_ATTR_RC);	rsc_state    = xmlGetProp(event, XML_LRM_ATTR_RSCSTATE);	op_status    = xmlGetProp(event, XML_LRM_ATTR_OPSTATUS);		if(op_status != NULL) {		op_status_i = atoi(op_status);	}		this_action = xmlGetProp(action->xml, XML_LRM_ATTR_TASK);	this_node   = xmlGetProp(action->xml, XML_LRM_ATTR_TARGET);	this_rsc    = xmlGetProp(action->xml, XML_LRM_ATTR_RSCID);		crm_devel("matching against: <%s task=%s node=%s rsc_id=%s/>",		  action->xml->name, this_action, this_node, this_rsc);		if(safe_str_neq(this_node, event_node)) {		crm_devel("node mismatch: %s", event_node);	} else if(safe_str_neq(this_action, event_action)) {			crm_devel("action mismatch: %s", event_action);			} else if(safe_str_eq(action->xml->name, XML_GRAPH_TAG_RSC_OP)) {		crm_devel(XML_GRAPH_TAG_RSC_OP);		if(safe_str_eq(this_rsc, event_rsc)) {			match = action;		} else {			crm_devel("bad rsc (%s) != (%s)", this_rsc, event_rsc);		}			} else if(safe_str_eq(action->xml->name, XML_GRAPH_TAG_CRM_EVENT)) {		crm_devel(XML_GRAPH_TAG_CRM_EVENT);		match = action;			} else {		crm_devel("no match");	}		if(match == NULL) {		crm_debug("didnt match current action");		return -1;	}	crm_debug("matched");	/* stop this event's timer if it had one */	stop_te_timer(match->timer);	/* Process OP status */	allow_fail = xmlGetProp(match->xml, "allow_fail");	switch(op_status_i) {		case LRM_OP_DONE:			break;		case LRM_OP_ERROR:		case LRM_OP_TIMEOUT:		case LRM_OP_NOTSUPPORTED:			if(safe_str_neq(allow_fail, XML_BOOLEAN_TRUE)) {				crm_err("Action %s to %s on %s resulted in"					" failure... aborting transition.",					event_action, event_rsc, event_node);				send_abort("Action failed", match->xml);				return -2;			}			break;		case LRM_OP_CANCELLED:			/* do nothing?? */			crm_warn("Dont know what to do for cancelled ops yet");			break;		default:			crm_err("Unsupported action result: %d", op_status_i);			send_abort("Unsupport action result", match->xml);			return -2;	}		crm_devel("Action %d was successful, looking for next action",		match->id);	match->complete = TRUE;	return match->id;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/c7c5fc7c53a15eefc2aea4bf8ccaf2175307f9f5/tengine.c/buggy/crm/tengine/tengine.c