From 646a39fd063f0e2ed10aadc496e60d8296598e20 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 24 Feb 2006 20:56:03 +0000 Subject: [PATCH] Uses archiver from the setup to pack mail for a node --- ChangeLog | 3 +++ mbfido/queue.c | 19 ++++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02677cca..0cda9837 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,9 @@ $Id$ v0.83.14 23-Feb-2006 + mbfido: + Uses archiver from the setup to pack mail for a node. + mbsetup: Added archiver selection for nodes in node setup. diff --git a/mbfido/queue.c b/mbfido/queue.c index c99c47b9..ea19279e 100644 --- a/mbfido/queue.c +++ b/mbfido/queue.c @@ -4,7 +4,7 @@ * Purpose ...............: Mail and file queue operations * ***************************************************************************** - * Copyright (C) 1997-2005 + * Copyright (C) 1997-2006 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -265,14 +265,14 @@ void flush_dir(char *ndir) closedir(dp); sort_fdlist(&fdl); - if (getarchiver((char *)"ZIP")) { + if (getarchiver(nodes.Archiver)) { flavor = 'f'; if (nodes.Crash) flavor = 'c'; if (nodes.Hold) flavor = 'h'; } else { - WriteError("Archiver ZIP not found"); + WriteError("Archiver %s not found", nodes.Archiver); if (noden.domain) free(noden.domain); free(temp); @@ -374,7 +374,7 @@ void flush_dir(char *ndir) } if (first) { - Syslog('+', "Pack ARCmail for %s via %s", aka2str(nodenr), ascfnode(&noden, 0x1f)); + Syslog('+', "Pack ARCmail for %s via %s with %s", aka2str(nodenr), ascfnode(&noden, 0x1f), nodes.Archiver); if (!do_quiet) { printf("\rAdding ARCmail for %s ", ascfnode(&noden, 0x1f)); fflush(stdout); @@ -386,15 +386,8 @@ void flush_dir(char *ndir) if (execute_str(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { unlink(fname); } else { - WriteError("Create ARCmail failed, trying again after sync()"); - sync(); - sleep(1); - if (execute_str(archiver.marc, arcfile, fname, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { - unlink(fname); - } else { - WriteError("Can't add %s to ARCmail archive", fname); - Attach = FALSE; - } + WriteError("Can't add %s to ARCmail archive", fname); + Attach = FALSE; } /*