]> git.pond.sub.org Git - empserver/commit - src/lib/update/sect.c
update: Fix avail roll over for stopped or broke sectors
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 8 Jul 2016 05:30:51 +0000 (07:30 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:59 +0000 (19:59 +0200)
commit8e246ee06d36730710b38c1e97848237b6126765
treee22b180639eab429593343180db33502979cd84c
parent6fcbc16adf30ee3090910b2c7a58d5ccd8f1cf02
update: Fix avail roll over for stopped or broke sectors

People don't work when their sector is stopped or their nation is
broke.  Implemented by produce_sect() skipping the assignment of new
work returned by do_feed() to sct_avail.

This is wrong because it lets all old work roll over, ignoring
rollover_avail_max.

Broken in 4.0.0.  Similarly broken for sectors disabled via zero
budget priority between a botched fix for changing sector types in
Chainsaw and the removal of budget priorities in commit 520446e,
v4.3.6.

Fix by zapping available work when the sector is stopped or its owner
is broke.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/update/sect.c
tests/update/final.xdump
tests/update/journal.log