Fix for bug in upload QWK replies
This commit is contained in:
parent
0c9eec7371
commit
2ddbe9dffc
@ -23,6 +23,7 @@ v0.37.5 12-Jul-2003
|
||||
During virusscan of file uploads, the mbtask timeout timer is
|
||||
set to one hour to support very long scans.
|
||||
Changed logging during user login.
|
||||
Fixed bugs in QWK mail upload processing.
|
||||
|
||||
mbsetup:
|
||||
Added menu entry 1.5.21 for setting maximum allowed logins.
|
||||
|
@ -2288,6 +2288,7 @@ void QWK_Fetch()
|
||||
sprintf(Dirpath, "%s/%s", CFG.bbs_usersdir, exitinfo.Name);
|
||||
sprintf(Filename, "%s.MSG", CFG.bbsid);
|
||||
if (getfilecase(Dirpath, Filename)) {
|
||||
sprintf(temp, "%s/%s", Dirpath, Filename);
|
||||
up = fopen(temp, "r");
|
||||
}
|
||||
|
||||
@ -2369,12 +2370,14 @@ void QWK_Fetch()
|
||||
sprintf(otemp, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
||||
if ((mf = fopen(otemp, "r+")) != NULL) {
|
||||
fread(&msgshdr, sizeof(msgshdr), 1, mf);
|
||||
fseek(mf, ((Area -1) * (msgshdr.recsize + msgshdr.syssize)) + msgshdr.hdrsize, SEEK_SET);
|
||||
fread(&msgs, msgshdr.recsize, 1, mf);
|
||||
if ((fseek(mf, ((Area -1) * (msgshdr.recsize + msgshdr.syssize)) + msgshdr.hdrsize, SEEK_SET) == 0) &&
|
||||
(fread(&msgs, msgshdr.recsize, 1, mf) == 1)) {
|
||||
Syslog('m', "pos %d, should be %d", ftell(mf), ((Area) * (msgshdr.recsize + msgshdr.syssize)) + msgshdr.hdrsize - msgshdr.syssize);
|
||||
|
||||
/*
|
||||
* Check access to this area
|
||||
*/
|
||||
Syslog('m', "%s %s", msgs.QWKname, msgs.Base);
|
||||
if (msgs.Active && strlen(msgs.QWKname) && Access(exitinfo.Security, msgs.WRSec) &&
|
||||
(msgs.MsgKinds != RONLY)) {
|
||||
if (Open_Msgbase(msgs.Base, 'w')) {
|
||||
@ -2497,6 +2500,9 @@ void QWK_Fetch()
|
||||
Syslog('+', "Can't post messages in area %u", Area);
|
||||
}
|
||||
fclose(mf);
|
||||
} else {
|
||||
WriteError("$Can't read message area %u", Area);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -2518,7 +2524,8 @@ void QWK_Fetch()
|
||||
do_mailout = TRUE;
|
||||
}
|
||||
fflush(stdout);
|
||||
unlink(temp);
|
||||
sprintf(temp, "%s/%s", Dirpath, Filename);
|
||||
Syslog('m', "Unlink %s rc=%d", temp, unlink(temp));
|
||||
free(temp);
|
||||
free(otemp);
|
||||
Pause();
|
||||
|
Reference in New Issue
Block a user