next_action = g_slist_nth_data(matched_action_list->actions,
next_action = g_list_nth_data(matched_action_list->actions,
process_graph_event(const char *event_node,		    const char *event_rsc, 		    const char *event_action, 		    const char *event_status, 		    const char *event_rc){	int lpc;	xmlNodePtr action        = NULL; // <rsc_op> or <crm_event>	xmlNodePtr next_action   = NULL;	action_list_t *matched_action_list = NULL;// Find the action corresponding to this event	slist_iter(		action_list, action_list_t, graph, lpc,		action = g_slist_nth_data(action_list->actions,					  action_list->index);		if(action == NULL) {			continue;		}/*		<rsc_op id= runnable= optional= task= on_node= >			<resource id="rsc3" priority="3.0"/>		</rsc_op>*/		const char *this_action = xmlGetProp(			action, XML_LRM_ATTR_TASK);		const char *this_node   = xmlGetProp(			action, XML_LRM_ATTR_TARGET);		const char *this_rsc    = xmlGetProp(			action->children, XML_ATTR_ID);		if(safe_str_neq(this_node, event_node)) {			continue;		} else if(safe_str_neq(this_action, event_action)) {			continue;					} else if(safe_str_eq(action->name, "rsc_op")			  && safe_str_eq(this_rsc, event_rsc)) {			matched_action_list = action_list;		} else if(safe_str_eq(action->name, "crm_event")) {			matched_action_list = action_list;		}		);				if(matched_action_list == NULL) {		// unexpected event, trigger a pe-recompute		// possibly do this only for certain types of actions		crm_err("Unexpected event... matched action list was NULL");		return FALSE;	}		// how do we distinguish action failure?	if(safe_str_neq(event_rc, "0")){		if(safe_str_neq((const char*)xmlGetProp(action, "allow_fail"),				XML_BOOLEAN_TRUE)) {			crm_err("Action %s to %s on %s resulted in failure..."			       " aborting transition.",			       event_action, event_rsc, event_node);			return FALSE;		}	}		while(matched_action_list->index <= matched_action_list->index_max) {		gboolean passed = FALSE;		next_action = g_slist_nth_data(matched_action_list->actions,					       matched_action_list->index);				passed = initiate_action(matched_action_list);		if(passed == FALSE) {			crm_err("Initiation of next event failed");			return FALSE;					} else if(matched_action_list->index >			  matched_action_list->index_max) {			/* last action in that list, check if there are			 *  anymore actions at all			 */			slist_iter(				action_list, action_list_t, graph, lpc,				if(action_list->index <=				   action_list->index_max){					return TRUE;				}				);		} else {			return TRUE;					}	}	crm_info("Transition complete...");	send_success();		return TRUE;}