INN commit: trunk/innd (ng.c)
INN Commit
Russ_Allbery at isc.org
Fri Apr 24 19:28:13 UTC 2009
Date: Friday, April 24, 2009 @ 12:28:13
Author: iulius
Revision: 8426
Check whether the high water mark is not inferior to the
low water mark of a newsgroup when running "ctlinnd lowmark".
Thanks to Steve Crook for the bug report.
Modified:
trunk/innd/ng.c
------+
ng.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
Modified: ng.c
===================================================================
--- ng.c 2009-04-24 19:25:11 UTC (rev 8425)
+++ ng.c 2009-04-24 19:28:13 UTC (rev 8426)
@@ -399,10 +399,9 @@
}
/*
- * Set the low article count for the given group.
- * Like NGrenumber(), but we don't scan the spool,
- * and the himark is ignored.
- */
+** Set the low article count for the given group.
+** Like NGrenumber(), but we don't query the overview database.
+*/
bool
NGlowmark(NEWSGROUP *ngp, long lomark)
{
@@ -419,6 +418,20 @@
LogName, MaxLength(start, start));
return false;
}
+ /* Check whether the high water mark is more than the low water mark
+ * minus one (in the case of an empty newsgroup). If not, we consider
+ * that the newsgroup is empty and we increase the high water mark. */
+ l = atol(f2);
+ if (l+1 < lomark) {
+ syslog(L_NOTICE, RENUMBER, LogName, ngp->Name, "hi", l, lomark-1);
+ if (!FormatLong(f2, lomark-1, f3 - f2 - 1)) {
+ syslog(L_ERROR, NORENUMBER, LogName, ngp->Name, "hi");
+ return false;
+ }
+ ngp->Last = lomark-1;
+ ICDactivedirty++;
+ }
+ /* Update the low water mark. */
l = atol(f3);
if (lomark != l) {
if (lomark < l)
More information about the inn-committers
mailing list