Fixed reset LR pointers in empty message areas.
This commit is contained in:
parent
053182b875
commit
8b152e4960
@ -13,6 +13,10 @@ v0.61.1 20-Jun-2004.
|
|||||||
used then mbfido behaves like it did upto version 0.50.0 and
|
used then mbfido behaves like it did upto version 0.50.0 and
|
||||||
mbnntp is disabled.
|
mbnntp is disabled.
|
||||||
|
|
||||||
|
libmsgbase.a:
|
||||||
|
If a message area becomes empty after a pack, all lastread
|
||||||
|
pointers are reset to zero.
|
||||||
|
|
||||||
mbfido:
|
mbfido:
|
||||||
Added compile directive for full newsgate.
|
Added compile directive for full newsgate.
|
||||||
|
|
||||||
|
6
TODO
6
TODO
@ -29,12 +29,6 @@ libdiesel.a:
|
|||||||
U: Processed stringlines containing unbalanced " characters are not
|
U: Processed stringlines containing unbalanced " characters are not
|
||||||
processed, instead the previous macro value will be returned.
|
processed, instead the previous macro value will be returned.
|
||||||
|
|
||||||
libmsgbase.a:
|
|
||||||
N: If a area becomes empty, the lastread pointers have the wrong value
|
|
||||||
the should be zero so that when a new (first) message arrives in the
|
|
||||||
area, mbsebbs, GoldED etc will show that there are new unread
|
|
||||||
messages in the area.
|
|
||||||
|
|
||||||
mbsebbs:
|
mbsebbs:
|
||||||
U: If a users homedir is missing, the users sees a wrong error message
|
U: If a users homedir is missing, the users sees a wrong error message
|
||||||
before the connection is terminated.
|
before the connection is terminated.
|
||||||
|
10
lib/jammsg.c
10
lib/jammsg.c
@ -709,13 +709,19 @@ void JAM_Pack(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now copy the lastread file
|
* Now copy the lastread file, reset LastRead pointers if area is empty.
|
||||||
*/
|
*/
|
||||||
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)) {
|
||||||
|
if (jamHdrInfo.ActiveMsgs == 0 && (LR.LastReadMsg || LR.HighReadMsg)) {
|
||||||
|
Syslog('-', "jamPack: reset LR pointer index %d, area %s", i, BaseName);
|
||||||
|
LR.LastReadMsg = 0;
|
||||||
|
LR.HighReadMsg = 0;
|
||||||
|
}
|
||||||
write(fdnJlr, &LR, sizeof(lastread));
|
write(fdnJlr, &LR, sizeof(lastread));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Close all files
|
* Close all files
|
||||||
|
Reference in New Issue
Block a user