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.
This commit is contained in:
parent
bba8db34d0
commit
8ebed5ba05
1 changed files with 2 additions and 0 deletions
|
@ -61,6 +61,8 @@ nreport(natid actor, int event, natid victim, int times)
|
|||
return;
|
||||
|
||||
np = ncache(actor, event, victim, times);
|
||||
/* TODO get rid of nws_generation? */
|
||||
ef_mark_fresh(EF_NEWS, np);
|
||||
putnews(np->nws_uid, np);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue