Fixed small archiver select problem

This commit is contained in:
Michiel Broek 2006-02-26 11:19:02 +00:00
parent 4ddb5863e7
commit 9293010a0b
3 changed files with 15 additions and 3 deletions

View File

@ -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

View File

@ -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);

View File

@ -771,12 +771,21 @@ char *PickArchive(char *shdr, int mailmode)
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);
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);