]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Fatals/panics logged by master weren't logged properly.
authorTimo Sirainen <tss@iki.fi>
Wed, 5 Mar 2008 00:17:52 +0000 (02:17 +0200)
committerTimo Sirainen <tss@iki.fi>
Wed, 5 Mar 2008 00:17:52 +0000 (02:17 +0200)
--HG--
branch : HEAD

src/master/main.c

index 839c968116153a24d339d16ea55cede484005f24..f0ed03d4093549e121730fccb2fc92c21f6fe067 100644 (file)
@@ -52,13 +52,15 @@ master_fatal_callback(enum log_type type, int status,
 {
        const struct settings *set = settings_root->defaults;
        const char *path, *str;
+       va_list args2;
        int fd;
 
        /* write the error message to a file */
        path = t_strconcat(set->base_dir, "/"FATAL_FILENAME, NULL);
        fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0600);
        if (fd != -1) {
-               str = t_strdup_vprintf(format, args);
+               VA_COPY(args2, args);
+               str = t_strdup_vprintf(format, args2);
                write_full(fd, str, strlen(str));
                (void)close(fd);
        }