From 9293010a0b748d554884d31d963b59b93c941ab8 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 26 Feb 2006 11:19:02 +0000 Subject: [PATCH] Fixed small archiver select problem --- ChangeLog | 2 ++ mbsebbs/zmsend.c | 1 + mbsetup/m_archive.c | 15 ++++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index de448622..02e287f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,8 @@ v0.83.14 23-Feb-2006 mbsetup: Added archiver selection for nodes in node setup. + In archiver select added checks for valid archivers and allowed + escape without selecting an archiver. v0.83.13 13-Feb-2006 - 23-Feb-2006 diff --git a/mbsebbs/zmsend.c b/mbsebbs/zmsend.c index cceae16b..2ddd49c1 100644 --- a/mbsebbs/zmsend.c +++ b/mbsebbs/zmsend.c @@ -222,6 +222,7 @@ static int sendzfile(char *rn) (unsigned int)st.st_size, (int)st.st_mtime + (int)(st.st_mtime % 2), st.st_mode); bufl = strlen(txbuf); *(strchr(txbuf,' ')) = '\0'; /*hope no blanks in filename*/ + Syslog('z', "txbuf \"%s\"", printable(txbuf, 0)); Eofseen = 0; rc = zsendfile(txbuf,bufl); diff --git a/mbsetup/m_archive.c b/mbsetup/m_archive.c index 33e7c16f..edc995a1 100644 --- a/mbsetup/m_archive.c +++ b/mbsetup/m_archive.c @@ -770,13 +770,22 @@ char *PickArchive(char *shdr, int mailmode) if (strncmp(pick, "P", 1) == 0) if ((o - 10) >= 0) o = o - 10; - + + if (strncmp(pick, "-", 1) == 0) { + break; + } + if ((atoi(pick) >= 1) && (atoi(pick) <= records)) { offset = sizeof(archiverhdr) + ((atoi(pick) - 1) * archiverhdr.recsize); fseek(fil, offset, 0); fread(&archiver, archiverhdr.recsize, 1, fil); - strcpy(Arch, archiver.name); - break; + if ((mailmode && archiver.available && strlen(archiver.marc)) || + (! mailmode && archiver.available && strlen(archiver.farc))) { + strcpy(Arch, archiver.name); + break; + } else { + working(2, 0, 0); + } } } fclose(fil);