InterNetNews / inn

INN (InterNetNews) Usenet server
https://www.isc.org/othersoftware/#INN
Other
68 stars 13 forks source link

Fix reported low water mark on empty newsgroups #250

Closed Julien-Elie closed 1 year ago

Julien-Elie commented 1 year ago

When the highest used article number of an empty newsgroup is n, INN currently reports low=n+1, high=n. We should instead report low=n, high=n-1 in accordance with RFC 3977 which recommends that the high water mark is one less than the low water mark.

Besides, the reported low water mark currently exceeds 2^31-1 with that rule:

GROUP trigofacile.test.maxartnum
211 0 2147483648 2147483647 trigofacile.test.maxartnum

This should be fixed, and make sure that the reported high water mark cannot be negative.