]> git.pond.sub.org Git - empserver/commit
Fix generation numbers for news file
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 Mar 2009 17:49:06 +0000 (18:49 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 10 Mar 2009 19:52:26 +0000 (20:52 +0100)
commit8ebed5ba057d18a5ab08a0d7b2cee96c72f1f9ff
treef4c015219225257597293b9a8209314aab6fb366
parentbba8db34d0395795f24663d801dfe85531000ecd
Fix generation numbers for news file

nreport() caches recent news reports in cache[], so it can collapse
multiple news reports into one.  Writing back such a collapsed news
report triggered a generation oops when the processor had been yielded
since the cached report was last written back.  But this is actually
perfectly safe, because the cache can't become stale: news file
updates either go through the cache (nreport()), or they clear the
entire cache (delete_old_news()).

Silence the oops by marking the news report fresh.

A case could be made for removing nws_generation alltogether.  Maybe
later.
src/lib/subs/nreport.c