Adding .pkt file to arcmail now does 2 attempts

This commit is contained in:
Michiel Broek
2002-03-21 21:03:39 +00:00
parent a755d6c33d
commit 6e8d699ec3
2 changed files with 13 additions and 1 deletions

View File

@@ -243,8 +243,18 @@ int pack_queue(char *name)
}
fsize = file_size(arcfile);
if (execute(archiver.marc, arcfile, pktfile, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0)
if (execute(archiver.marc, arcfile, pktfile, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) {
unlink(pktfile);
} else {
sync();
sleep(1);
Syslog('+', "Create ARCmail failed, trying again after sync()");
if (execute(archiver.marc, arcfile, pktfile, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) {
unlink(pktfile);
} else {
WriteError("Can't add %s to ARCmail archive", pktfile);
}
}
/*
* Attach file to .flo