INN commit: trunk (CONTRIBUTORS storage/buffindexed/buffindexed.c)
INN Commit
Russ_Allbery at isc.org
Fri Apr 24 19:25:12 UTC 2009
Date: Friday, April 24, 2009 @ 12:25:11
Author: iulius
Revision: 8425
The low water mark was not properly set by expire on an
empty newsgroup when running a buffindexed overview.
Thanks to Steve Crook for the bug report.
Modified:
trunk/CONTRIBUTORS
trunk/storage/buffindexed/buffindexed.c
-----------------------------------+
CONTRIBUTORS | 3 ++-
storage/buffindexed/buffindexed.c | 27 +++++++++++++--------------
2 files changed, 15 insertions(+), 15 deletions(-)
Modified: CONTRIBUTORS
===================================================================
--- CONTRIBUTORS 2009-04-19 20:24:58 UTC (rev 8424)
+++ CONTRIBUTORS 2009-04-24 19:25:11 UTC (rev 8425)
@@ -269,4 +269,5 @@
D. Stussy, Alan Schwartz, Shalon Wood, Nick Couchman, Jakub Bogusz,
J. Thomas Halliley, Matija Nalis, Geraint A. Edwards, Alexander Bartolich,
David Hlacik, Andreas Mattheiss, James Ralston, Wim Lewis, Johan van Selst,
-Wolfgang M. Weyand, Berend Reitsma, William Kronert, Petr Novopashenniy
+Wolfgang M. Weyand, Berend Reitsma, William Kronert, Petr Novopashenniy,
+Steve Crook
Modified: storage/buffindexed/buffindexed.c
===================================================================
--- storage/buffindexed/buffindexed.c 2009-04-19 20:24:58 UTC (rev 8424)
+++ storage/buffindexed/buffindexed.c 2009-04-24 19:25:11 UTC (rev 8425)
@@ -2100,10 +2100,9 @@
GROUPlock(gloc, INN_LOCK_WRITE);
ge = &GROUPentries[gloc.recno];
if (ge->count == 0) {
- if (ge->low < ge->high)
- ge->low = ge->high;
- if (lo)
- *lo = ge->low + 1;
+ ge->low = ge->high + 1;
+ if (lo != NULL)
+ *lo = ge->low;
ge->expired = time(NULL);
GROUPlock(gloc, INN_LOCK_UNLOCK);
return true;
@@ -2158,18 +2157,18 @@
return false;
}
}
- if (newge.low == 0)
- /* no article for the group */
+ if (newge.low == 0) {
+ /* No article for the group. */
newge.low = newge.high;
+ }
+ if (newge.count == 0) {
+ /* The low water mark should be one more than the high water mark
+ * when there is no article in the group. */
+ newge.low = newge.high + 1;
+ }
*ge = newge;
- if (lo) {
- if (ge->count == 0) {
- if (ge->low < ge->high)
- ge->low = ge->high;
- /* lomark should be himark + 1, if no article for the group */
- *lo = ge->low + 1;
- } else
- *lo = ge->low;
+ if (lo != NULL) {
+ *lo = ge->low;
}
ovclosesearch(handle, true);
ge->expired = time(NULL);
More information about the inn-committers
mailing list