crm_err("Processing %s reply...", op);
crm_debug("Processing %s reply...", op);
process_te_message(HA_Message *msg, crm_data_t *xml_data, IPC_Channel *sender){	crm_data_t *xml_obj = NULL;		const char *sys_to   = cl_get_string(msg, F_CRM_SYS_TO);	const char *sys_from = cl_get_string(msg, F_CRM_SYS_FROM);	const char *ref      = cl_get_string(msg, XML_ATTR_REFERENCE);	const char *op       = cl_get_string(msg, F_CRM_TASK);	const char *type     = cl_get_string(msg, F_CRM_MSG_TYPE);	crm_log_message(LOG_DEBUG_3, msg);	crm_debug("Processing %s (%s) message", op, ref);		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_debug_2("Bad sys-to %s", crm_str(sys_to));		return FALSE;		#ifdef TESTING	} else if(strcmp(op, CRM_OP_EVENTCC) == 0) {		crm_debug_4("Processing %s...", op);		xml_obj = find_xml_node(xml_data, XML_TAG_CIB, TRUE);		CRM_DEV_ASSERT(xml_obj != NULL);		if(xml_obj != NULL) {			xml_obj = get_object_root(XML_CIB_TAG_STATUS, xml_obj);			CRM_DEV_ASSERT(xml_obj != NULL);		}		if(xml_obj != NULL) {			crm_log_message_adv(LOG_DEBUG, "Processing Loopbacked Action", msg);			extract_event(xml_obj);		} else {			crm_log_message_adv(LOG_ERR, "Invalid Loopbacked Action", msg);		}#endif 	} else if(safe_str_eq(op, CRM_OP_INVOKE_LRM)		  && safe_str_eq(sys_from, CRM_SYSTEM_LRMD)		  && safe_str_eq(type, XML_ATTR_RESPONSE) ){		crm_err("Processing %s reply...", op);		xml_obj = find_xml_node(xml_data, XML_TAG_CIB, TRUE);		CRM_DEV_ASSERT(xml_obj != NULL);		if(xml_obj != NULL) {			xml_obj = get_object_root(XML_CIB_TAG_STATUS, xml_obj);			CRM_DEV_ASSERT(xml_obj != NULL);		}		if(xml_obj != NULL) {			crm_log_message_adv(LOG_DEBUG, "Processing NACK Reply", msg);			extract_event(xml_obj);		} else {			crm_log_message_adv(LOG_ERR, "Invalid NACK Reply", msg);		}					} else if(safe_str_eq(type, XML_ATTR_RESPONSE)) {		crm_info("Message was a response not a request.  Discarding");		return TRUE;	} else if(strcmp(op, CRM_OP_TRANSITION) == 0) {		if(te_fsa_state != s_idle) {			crm_debug("Attempt to start another transition");			send_complete("Attempt to start another transition",				      NULL, te_abort, i_cancel);		} else {			te_fsa_state = te_state_matrix[i_transition][te_fsa_state];			CRM_DEV_ASSERT(te_fsa_state == s_in_transition);			initialize_graph();			unpack_graph(xml_data);						crm_debug("Initiating transition...");			if(initiate_transition() == FALSE) {				/* nothing to be done.. means we're done. */				crm_info("No actions to be taken..."					 " transition compelte.");			}		}	} else if(strcmp(op, CRM_OP_TE_HALT) == 0) {		send_complete(CRM_OP_TE_HALT, NULL, te_halt, i_cancel);	} else if(strcmp(op, CRM_OP_TEABORT) == 0) {		send_complete(CRM_OP_TEABORTED, NULL, te_abort, i_cancel);	} else if(strcmp(op, CRM_OP_QUIT) == 0) {		crm_info("Received quit message, terminating");		/* wait for pending actions to complete? */		exit(0);			} else {		crm_err("Unknown command: %s::%s from %s", type, op, sys_from);	}	crm_debug_3("finished processing message");		return TRUE;}