]> git.pond.sub.org Git - empserver/commit - src/lib/subs/nreport.c
Fix tests for unused news slots
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 24 Feb 2008 19:33:57 +0000 (20:33 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 14 Mar 2008 19:25:08 +0000 (20:25 +0100)
commit5fda9462bd7263fe52d892b34b254114a7b6c3f5
tree5051cfe1cc1c9baedc6e47b4d56919169c06285f
parent832574b6dee87f4efb56945c62e5d2fadec27288
Fix tests for unused news slots

delete_old_news() and init_nreport() tested for non-zero nws_when,
which is breaks for news at the epoch.  Not likely to happen, but
still wrong.

ncache() tested nws_uid, which breaks for the first entry in the news
file.  This made ncache() overlook that entry in the cache, and create
a new news item instead of incrementing nws_ntm.  Was always broken
that way.

Fix by testing nws_vrb instead.
src/lib/subs/nreport.c