graph = find_xml_node(msg, "transition_graph"); 
xmlNodePtr graph = find_xml_node(msg, "transition_graph"); 
process_te_message(xmlNodePtr msg, IPC_Channel *sender){	xmlNodePtr graph = NULL;	const char *op = get_xml_attr (msg, XML_TAG_OPTIONS,				       XML_ATTR_OP, FALSE);	const char *sys_to = xmlGetProp(msg, XML_ATTR_SYSTO);	const char *ref    = xmlGetProp(msg, XML_ATTR_REFERENCE);	crm_debug("Processing %s (%s) message", op, ref);#ifdef MSG_LOG	if(msg_te_strm == NULL) {		msg_te_strm = fopen("/tmp/te.log", "w");	}	fprintf(msg_te_strm, "[Input %s]\t%s\n",		op, dump_xml_node(msg, FALSE));	fflush(msg_te_strm);#endif	if(safe_str_eq(xmlGetProp(msg, XML_ATTR_MSGTYPE), XML_ATTR_RESPONSE)	   && safe_str_neq(op, CRM_OP_EVENTCC)) {#ifdef MSG_LOG	fprintf(msg_te_strm, "[Result ]\tDiscarded\n");	fflush(msg_te_strm);#endif		crm_info("Message was a response not a request.  Discarding");		return TRUE;	}		if(op == NULL){		// error	} else if(strcmp(op, CRM_OP_HELLO) == 0) {		// ignore	} else if(sys_to == NULL || strcmp(sys_to, CRM_SYSTEM_TENGINE) != 0) {		crm_verbose("Bad sys-to %s", sys_to);		return FALSE;			} else if(strcmp(op, CRM_OP_TRANSITION) == 0) {		crm_trace("Initializing graph...");		initialize_graph();		graph = find_xml_node(msg, "transition_graph");		crm_trace("Unpacking graph...");		unpack_graph(graph);		crm_trace("Initiating transition...");		if(initiate_transition() == FALSE) {			// nothing to be done.. means we're done.			crm_info("No actions to be taken..."			       " transition compelte.");			send_success();				}		crm_trace("Processing complete...");					} else if(strcmp(op, CRM_OP_EVENTCC) == 0) {		const char *true_op = get_xml_attr (msg, XML_TAG_OPTIONS,						    XML_ATTR_TRUEOP, TRUE);		if(true_op == NULL) {			crm_err(			       "Illegal update,"			       " the original operation must be specified");			send_abort(msg);					} else if(strcmp(true_op, CRM_OP_CREATE) == 0		   || strcmp(true_op, CRM_OP_DELETE) == 0		   || strcmp(true_op, CRM_OP_REPLACE) == 0		   || strcmp(true_op, CRM_OP_WELCOME) == 0		   || strcmp(true_op, CRM_OP_SHUTDOWN_REQ) == 0		   || strcmp(true_op, CRM_OP_ERASE) == 0) {			// these are always unexpected, trigger the PE			send_abort(msg);					} else if(strcmp(true_op, CRM_OP_UPDATE) == 0) {			// this may not be un-expected			if(extract_event(msg) == FALSE){				send_abort(msg);			}					} else {			crm_err(			       "Did not expect copy of action %s", op);		}			} else if(strcmp(op, CRM_OP_ABORT) == 0) {		initialize_graph();	} else if(strcmp(op, CRM_OP_QUIT) == 0) {		crm_err("Received quit message, terminating");		exit(0);	}		return TRUE;}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/ead633eb23a5e8206743fb4f7634ad71518a2631/tengine.c/buggy/crm/tengine/tengine.c