Fixed failed file attaches

This commit is contained in:
Michiel Broek 2002-06-02 13:03:50 +00:00
parent 8911a7c5b5
commit 996cb332ca
3 changed files with 73 additions and 62 deletions

View File

@ -197,6 +197,8 @@ v0.33.20 10-Feb-2002
When a virus scanner is started, de mbtask connection timeout When a virus scanner is started, de mbtask connection timeout
is set to one hour. is set to one hour.
Changed the confusing No Touch setting in tic areas to Touch. Changed the confusing No Touch setting in tic areas to Touch.
When a file to be attached doesn't exist, a error message is
logged and the attach is treaded as an error.
mbmsg: mbmsg:
When creating non-existend message bases, the path is created When creating non-existend message bases, the path is created

2
TODO
View File

@ -69,6 +69,8 @@ mbfido:
N: The first file received in a not yet created tic area is refused N: The first file received in a not yet created tic area is refused
after the area is created: node xxx not connected to area xxx. after the area is created: node xxx not connected to area xxx.
N: Doesn't erase netmail.jam and/or echomail.jam after a full mailscan.
mbcico: mbcico:
L: Implement modem connect response translation for ISDN lines, i.e. L: Implement modem connect response translation for ISDN lines, i.e.
make the CAUSE responses human readable. see McMail for this make the CAUSE responses human readable. see McMail for this

View File

@ -41,10 +41,16 @@ int attach(faddr noden, char *ofile, int mode, char flavor)
{ {
FILE *fp; FILE *fp;
char *flofile; char *flofile;
int rc;
if (ofile == NULL) if (ofile == NULL)
return FALSE; return FALSE;
if ((rc = file_exist(ofile, R_OK))) {
WriteError("attach: file %s failed, %s", ofile, strerror(rc));
return FALSE;
}
flofile = calloc(PATH_MAX, sizeof(char)); flofile = calloc(PATH_MAX, sizeof(char));
sprintf(flofile, "%s", floname(&noden, flavor)); sprintf(flofile, "%s", floname(&noden, flavor));
@ -81,6 +87,7 @@ int attach(faddr noden, char *ofile, int mode, char flavor)
fprintf(fp, "%s\r\n", ofile); fprintf(fp, "%s\r\n", ofile);
} }
break; break;
case KFS: case KFS:
if (strlen(CFG.dospath)) { if (strlen(CFG.dospath)) {
if (CFG.leavecase) if (CFG.leavecase)