Reverted JAM LR pointers back to what it was.

This commit is contained in:
Michiel Broek 2002-05-21 19:07:05 +00:00
parent 204bd91492
commit b1353db234
3 changed files with 12 additions and 6 deletions

View File

@ -4631,8 +4631,6 @@ v0.33.20 10-Feb-2002
msgbase.a: msgbase.a:
Improved logging for opening message bases. Improved logging for opening message bases.
Added function to delete a JAM message base. Added function to delete a JAM message base.
Changed the handling of the lastread pointers in the JAM pack
function which caused problems on FreeBSD.
mbsetup: mbsetup:
In message groups added default settings for auto area In message groups added default settings for auto area

4
TODO
View File

@ -33,6 +33,8 @@ mbsebbs:
L: Better word wrapping or paragraph justification in editor. L: Better word wrapping or paragraph justification in editor.
L: E-mail downloads with e-mail verification.
mbfido: mbfido:
U: Code cleanup and make a structure in this program. Remove duplicate U: Code cleanup and make a structure in this program. Remove duplicate
or similar functions. or similar functions.
@ -40,8 +42,6 @@ mbfido:
N: Remove memory leak during toss. (It's ok for less 5000 messages for N: Remove memory leak during toss. (It's ok for less 5000 messages for
each run). each run).
N: Implement long filename support from .tic files (testing fase).
N: When a news article is received from a mailinglist there is a valid N: When a news article is received from a mailinglist there is a valid
To: address in the message, the gate doesn't see that and uses the To: address in the message, the gate doesn't see that and uses the
name to "All". name to "All".

View File

@ -642,7 +642,6 @@ void JAM_Pack(void)
Written++; Written++;
lseek(fdJlr, 0, SEEK_SET); lseek(fdJlr, 0, SEEK_SET);
lseek(fdnJlr, 0, SEEK_SET);
while ((read(fdJlr, &LR, sizeof(lastread)) == sizeof(lastread))) { while ((read(fdJlr, &LR, sizeof(lastread)) == sizeof(lastread))) {
/* /*
* Test if one of the lastread pointer is the current * Test if one of the lastread pointer is the current
@ -656,8 +655,9 @@ void JAM_Pack(void)
LR.LastReadMsg = NewNumber; LR.LastReadMsg = NewNumber;
if (LR.HighReadMsg == jamHdr.MsgNum) if (LR.HighReadMsg == jamHdr.MsgNum)
LR.HighReadMsg = NewNumber; LR.HighReadMsg = NewNumber;
lseek(fdJlr, - sizeof(lastread), SEEK_CUR);
write(fdJlr, &LR, sizeof(lastread));
} }
write(fdnJlr, &LR, sizeof(lastread));
} }
jamHdr.MsgNum = NewNumber; jamHdr.MsgNum = NewNumber;
write(fdnHdr, &jamHdr, sizeof(JAMHDR)); write(fdnHdr, &jamHdr, sizeof(JAMHDR));
@ -700,6 +700,14 @@ void JAM_Pack(void)
} }
} }
/*
* Now copy the lastread file
*/
lseek(fdJlr, 0, SEEK_SET);
while (read(fdJlr, &LR, sizeof(lastread)) == sizeof(lastread)) {
write(fdnJlr, &LR, sizeof(lastread));
}
/* /*
* Close all files * Close all files
*/ */