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

@@ -642,7 +642,6 @@ void JAM_Pack(void)
Written++;
lseek(fdJlr, 0, SEEK_SET);
lseek(fdnJlr, 0, SEEK_SET);
while ((read(fdJlr, &LR, sizeof(lastread)) == sizeof(lastread))) {
/*
* Test if one of the lastread pointer is the current
@@ -656,8 +655,9 @@ void JAM_Pack(void)
LR.LastReadMsg = NewNumber;
if (LR.HighReadMsg == jamHdr.MsgNum)
LR.HighReadMsg = NewNumber;
lseek(fdJlr, - sizeof(lastread), SEEK_CUR);
write(fdJlr, &LR, sizeof(lastread));
}
write(fdnJlr, &LR, sizeof(lastread));
}
jamHdr.MsgNum = NewNumber;
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
*/