crm_err("ERRORs found during PE processing."
crm_info("ERRORs found during PE processing."
process_pe_message(HA_Message *msg, crm_data_t * xml_data, IPC_Channel *sender){	const char *sys_to = cl_get_string(msg, F_CRM_SYS_TO);	const char *op = cl_get_string(msg, F_CRM_TASK);	const char *ref = cl_get_string(msg, XML_ATTR_REFERENCE);	crm_debug_3("Processing %s op (ref=%s)...", op, ref);		if(op == NULL){		/* error */	} else if(strcmp(op, CRM_OP_HELLO) == 0) {		/* ignore */			} else if(safe_str_eq(cl_get_string(msg, F_CRM_MSG_TYPE),			      XML_ATTR_RESPONSE)) {		/* ignore */			} else if(sys_to == NULL || strcmp(sys_to, CRM_SYSTEM_PENGINE) != 0) {		crm_debug_3("Bad sys-to %s", crm_str(sys_to));		return FALSE;			} else if(strcmp(op, CRM_OP_PECALC) == 0) {		crm_data_t *generation = create_xml_node(NULL, XML_TAG_CIB);		crm_data_t *status     = get_object_root(			XML_CIB_TAG_STATUS, xml_data);		crm_data_t *log_input  = status;		crm_data_t *output     = NULL;		log_input  = xml_data;		copy_in_properties(generation, xml_data);		crm_log_xml_info(generation, "[generation]");#if 0		char *xml_buffer = NULL;		char *xml_buffer_ptr = NULL;		int max_xml = MAXLINE - 8;				xml_buffer = dump_xml_unformatted(generation);		LogToCircularBuffer(input_buffer, LOG_INFO,				    "Generation: %s", xml_buffer);		crm_free(xml_buffer);		xml_buffer = dump_xml_unformatted(status);		xml_buffer_ptr = xml_buffer;		while(xml_buffer_ptr != NULL) {			LogToCircularBuffer(input_buffer, LOG_INFO,					    "PE xml: %s", xml_buffer_ptr);			if(strlen(xml_buffer_ptr) > max_xml) {				xml_buffer_ptr = xml_buffer_ptr + max_xml;			} else {				xml_buffer_ptr = NULL;;			}		}		crm_free(xml_buffer);#endif		was_processing_error = FALSE;		was_processing_warning = FALSE;		crm_malloc0(mem_stats, sizeof(cl_mem_stats_t));		crm_zero_mem_stats(mem_stats);		output = do_calculations(xml_data);		crm_log_xml_debug_3(output, "[out]");		if (send_ipc_reply(sender, msg, output) ==FALSE) {			crm_err("Answer could not be sent");		}		free_xml(output);				if(mem_stats->nbytes_alloc != 0) {			crm_mem_stats(mem_stats);			pe_warn("Unfree'd memory");		}		cl_malloc_setstats(NULL);		crm_free(mem_stats);			if(was_processing_error) {			crm_err("ERRORs found during PE processing."			       "  Input follows:");			crm_log_xml_info(log_input, "[input]");		} else if(was_processing_warning) {			crm_warn("WARNINGs found during PE processing."				"  Input follows:");			crm_log_xml_debug(log_input, "[input]");		} else {			crm_log_xml_debug_2(log_input, "[input]");		}		free_xml(generation);			} else if(strcmp(op, CRM_OP_QUIT) == 0) {		crm_warn("Received quit message, terminating");		exit(0);	}		return TRUE;}