]> git.pond.sub.org Git - empserver/commit
news: Merge news more aggressively
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 27 Jun 2016 19:35:23 +0000 (21:35 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:17 +0000 (20:09 +0200)
commitcbc23ae85832b82618e8c0d198a0b053169b303a
tree881ba127d535c40e4fe6189ff3cda9d34535612b
parentfda2ecb9103373ab2d52b8675ad508768a9492c4
news: Merge news more aggressively

News reporting merges news items into recent items with same actor,
action and victim, as long as the merged number of times doesn't
exceed 65535 (127 before the previous commit).

This complicates incremental xdump a bit: when the client sees a row,
it's not obvious which of the previously dumped rows it replaces.
Actually, rows with the same actor, action, victim and time replace in
xdump order.

Merge news item regardless of the number of times; saturate the number
at 65535.  Now the replacement is obvious, because there can only be
one news item with the same actor, action, victim and time.

This also rate-limits floods of identical news should they happen for
some reason.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/subs/nreport.c