From: Stephan Bosch Date: Mon, 27 Oct 2025 22:58:34 +0000 (+0100) Subject: lib: test-event-log - Use the new test-dir API X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0e4556a2990efbfae4a0eb1fc361abe1e0e44f9;p=thirdparty%2Fdovecot%2Fcore.git lib: test-event-log - Use the new test-dir API --- diff --git a/src/lib/test-event-log.c b/src/lib/test-event-log.c index 5a2e2b387e..3bbf82c8a1 100644 --- a/src/lib/test-event-log.c +++ b/src/lib/test-event-log.c @@ -45,7 +45,7 @@ struct test_log { enum test_log_flag flags; }; -static const char *temp_log_file = ".temp.log_file"; +static char *temp_log_file = NULL; static const char * test_event_log_prefix_cb(char *prefix) @@ -63,6 +63,7 @@ test_event_log_message_cb(char *prefix, static int temp_log_file_init(void) { + temp_log_file = i_strconcat(test_dir_get_prefix(), "event.log", NULL); int log_fd = open(temp_log_file, O_CREAT | O_TRUNC | O_RDWR, 0600); if (log_fd == -1) i_fatal("open(%s) failed: %m", temp_log_file); @@ -2518,4 +2519,5 @@ void test_event_log(void) i_set_error_handler(orig_error); i_close_fd(&log_fd); i_unlink(temp_log_file); + i_free(temp_log_file); }