Updated fix for FreeBSD lastread pointers

This commit is contained in:
Michiel Broek 2002-05-26 14:08:29 +00:00
parent 0a70980608
commit 91f59e902c
2 changed files with 165 additions and 166 deletions

View File

@ -4631,6 +4631,7 @@ v0.33.20 10-Feb-2002
msgbase.a:
Improved logging for opening message bases.
Added function to delete a JAM message base.
Fix for corrupting LastRead pointers on FreeBSD systems.
mbsetup:
In message groups added default settings for auto area

View File

@ -699,8 +699,7 @@ void JAM_Pack(void)
lseek(fdnHdr, 0, SEEK_SET);
if (read(fdnHdr, &jamHdrInfo, sizeof(JAMHDRINFO)) == sizeof(JAMHDRINFO)) {
if (jamHdrInfo.ActiveMsgs != Written) {
WriteError("jamPack: repair msgs %lu to %lu area %s",
jamHdrInfo.ActiveMsgs, Written, BaseName);
WriteError("jamPack: repair msgs %lu to %lu area %s", jamHdrInfo.ActiveMsgs, Written, BaseName);
jamHdrInfo.ActiveMsgs = Written;
lseek(fdnHdr, 0, SEEK_SET);
write(fdnHdr, &jamHdrInfo, sizeof(JAMHDRINFO));
@ -713,10 +712,9 @@ void JAM_Pack(void)
*/
lseek(fdJlr, 0, SEEK_SET);
for (i = 0; i < count; i++) {
if (read(fdJlr, &LR, sizeof(lastread)) == sizeof(lastread)) {
if (read(fdJlr, &LR, sizeof(lastread)) == sizeof(lastread))
write(fdnJlr, &LR, sizeof(lastread));
}
}
/*
* Close all files