bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2013-2018 Dovecot authors, see the included COPYING file */
30a5cfac4dc13cc89f36b7b54f889fbb149f7e08Timo Sirainen unsigned char prefix_text[FLEXIBLE_ARRAY_MEMBER];
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainenstruct log_error_buffer *log_error_buffer_init(void)
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainenstatic void log_error_buffer_delete_head(struct log_error_buffer *buf)
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen /* last one */
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainenvoid log_error_buffer_add(struct log_error_buffer *buf,
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen /* @UNSAFE */
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen memcpy(data->prefix_text, error->prefix, prefix_size);
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen memcpy(data->prefix_text + prefix_size, error->text, text_size);
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainenvoid log_error_buffer_deinit(struct log_error_buffer **_buf)
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainenlog_error_buffer_iter_init(struct log_error_buffer *buf)
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen iter = i_new(struct log_error_buffer_iter, 1);
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainenlog_error_buffer_iter_next(struct log_error_buffer_iter *iter)
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen iter->error.prefix = (const void *)data->prefix_text;
6a3c23e577be41f7521995c5dae19abb2fb4ffb6Timo Sirainen iter->error.text = (const void *)(data->prefix_text +