]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fixed bug in mlmmj-maintd which caused loss of archive files in some requeue cases...
authormortenp <none@none>
Mon, 21 Dec 2009 06:32:00 +0000 (17:32 +1100)
committermortenp <none@none>
Mon, 21 Dec 2009 06:32:00 +0000 (17:32 +1100)
ChangeLog
src/mlmmj-maintd.c

index e3c5c940102b13862d94b41212b5abe2b6f24223..a26198759b1598889ff33600be089cada6c984da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+ o Fixed bug in mlmmj-maintd which caused loss of archive files in some
+   requeue cases (Robin H. Johnson)
  o Added README.postfix (Jeremy Hinegardner, Andreas Schneider)
  o Added support for digest and nomail to +list (Christoph Wilke)
  o Caseinsensitive string compare for owner addr when +list is invoked. Spotted
index c2a5d78c9ad03206d6a2a89d2b8dc75132b8ef9c..3cc67e1c09f58d7a9df305ccaf994b6a310971ae 100644 (file)
@@ -373,7 +373,7 @@ int resend_requeue(const char *listdir, const char *mlmmjsend)
        struct stat st;
        pid_t childpid, pid;
        time_t t;
-       int status, fromrequeuedir = 0;
+       int status, fromrequeuedir;
 
        if(chdir(dirname) < 0) {
                log_error(LOG_ARGS, "Could not chdir(%s)", dirname);
@@ -408,6 +408,10 @@ int resend_requeue(const char *listdir, const char *mlmmjsend)
 
                archivefilename = concatstr(3, listdir, "/archive/",
                                                dp->d_name);
+
+               /* Explicitly initialize for each mail we examine */
+               fromrequeuedir = 0;
+
                if(stat(archivefilename, &st) < 0) {
                        /* Might be it's just not moved to the archive
                         * yet because it's still getting sent, so just