Updated fix for FreeBSD lastread pointers
This commit is contained in:
parent
0a70980608
commit
91f59e902c
@ -4631,6 +4631,7 @@ 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.
|
||||||
|
Fix for corrupting LastRead pointers on FreeBSD systems.
|
||||||
|
|
||||||
mbsetup:
|
mbsetup:
|
||||||
In message groups added default settings for auto area
|
In message groups added default settings for auto area
|
||||||
|
@ -699,8 +699,7 @@ void JAM_Pack(void)
|
|||||||
lseek(fdnHdr, 0, SEEK_SET);
|
lseek(fdnHdr, 0, SEEK_SET);
|
||||||
if (read(fdnHdr, &jamHdrInfo, sizeof(JAMHDRINFO)) == sizeof(JAMHDRINFO)) {
|
if (read(fdnHdr, &jamHdrInfo, sizeof(JAMHDRINFO)) == sizeof(JAMHDRINFO)) {
|
||||||
if (jamHdrInfo.ActiveMsgs != Written) {
|
if (jamHdrInfo.ActiveMsgs != Written) {
|
||||||
WriteError("jamPack: repair msgs %lu to %lu area %s",
|
WriteError("jamPack: repair msgs %lu to %lu area %s", jamHdrInfo.ActiveMsgs, Written, BaseName);
|
||||||
jamHdrInfo.ActiveMsgs, Written, BaseName);
|
|
||||||
jamHdrInfo.ActiveMsgs = Written;
|
jamHdrInfo.ActiveMsgs = Written;
|
||||||
lseek(fdnHdr, 0, SEEK_SET);
|
lseek(fdnHdr, 0, SEEK_SET);
|
||||||
write(fdnHdr, &jamHdrInfo, sizeof(JAMHDRINFO));
|
write(fdnHdr, &jamHdrInfo, sizeof(JAMHDRINFO));
|
||||||
@ -713,10 +712,9 @@ void JAM_Pack(void)
|
|||||||
*/
|
*/
|
||||||
lseek(fdJlr, 0, SEEK_SET);
|
lseek(fdJlr, 0, SEEK_SET);
|
||||||
for (i = 0; i < count; i++) {
|
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));
|
write(fdnJlr, &LR, sizeof(lastread));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close all files
|
* Close all files
|
||||||
|
Reference in New Issue
Block a user