} else if(event != NULL) {
process_graph_event(xmlNodePtr event){	int lpc = 0, lpc2 = 0;	int transition_timeout = default_transition_timeout;	int action_id          = -1;	int op_status_i        = 0;	gboolean complete      = TRUE;	const char *op_status  = xmlGetProp(event, XML_LRM_ATTR_OPSTATUS);		if(op_status != NULL) {		op_status_i = atoi(op_status);	}		if(op_status_i == -1) {		/* just information that the action was sent */		crm_trace("Ignoring TE initiated updates");		return TRUE;	}	slist_iter(		synapse, synapse_t, graph, lpc,		/* lookup event */		slist_iter(			action, action_t, synapse->actions, lpc2,			action_id = match_graph_event(action, event);			if(action_id != -1) {				break;			}			);		if(action_id != -1) {			break;		}		);		if(action_id > -1) {		crm_xml_devel(event, "Event found");	} else if(action_id == -2) {		crm_xml_info(event, "Event found but failed");#ifdef TESTING	} else if(event == NULL) {#endif	} else {		/* unexpected event, trigger a pe-recompute */		/* possibly do this only for certain types of actions */		crm_err("Action not matched, aborting transition");		send_abort("Event not matched", event);		return FALSE;	}		/* something happened, stop the timer and start it again at the end */	if(global_transition_timer > 0) {		crm_devel("Stopping transition timeout");		g_source_remove(global_transition_timer);	}		slist_iter(		synapse, synapse_t, graph, lpc,				gboolean prereqs_complete = TRUE;		if(synapse->complete) {			continue;		} else {			/* indicate that the transition is not yet complete */			complete = FALSE;		}		/* lookup prereqs */		slist_iter(			prereq, action_t, synapse->inputs, lpc2,						crm_devel("Processing input %d", prereq->id);			if(prereq->id == action_id) {				crm_devel("Marking input %d complete",					action_id);				prereq->complete = TRUE;			} else {				crm_devel("Inputs for synapse %d not satisfied",					synapse->id);				prereqs_complete = FALSE;			}						);		if(prereqs_complete) {			crm_devel("All inputs for synapse %d satisfied..."				  " invoking actions", synapse->id);			slist_iter(				action, action_t, synapse->actions, lpc2,				/* Invoke the action and start the timer */				action->invoked = TRUE;				gboolean passed = initiate_action(action);				if(passed == FALSE) {					crm_err("Failed initiating "						"<%s id=%d> in synapse %d",						action->xml->name, action->id,						synapse->id);					send_abort("Action init failed",						   action->xml);					break;				} 				if(action->timeout > transition_timeout) {					transition_timeout = action->timeout;				}							);			synapse->complete = TRUE;			crm_debug("Synapse %d complete", synapse->id);		}				);	/* restart the transition timer again */	global_transition_timer = Gmain_timeout_add(		transition_timeout, timer_callback, NULL);	if(complete) {		send_success("complete");	}		return TRUE;}