Reverted JAM LR pointers back to what it was.
This commit is contained in:
12
lib/jammsg.c
12
lib/jammsg.c
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user