]> git.pond.sub.org Git - empserver/commit
Don't resupply supply unit after use as supply source
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 15 Feb 2009 06:30:23 +0000 (07:30 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 17 Feb 2009 18:30:35 +0000 (19:30 +0100)
commit07561b4772ab5b43cc80425c0f06326022b1f3d1
treebbccb82c39066095f01ecca5c6df4d95fd177223
parent2b7163f10a4c71a029f611a3bee39054a9f49b92
Don't resupply supply unit after use as supply source

Running supply recursively here is problematic, because it can draw
supplies from the outer supply's destination, which can then end up
with less than it asked for.

Serving as supply source never puts a unit that is in supply out of
supply.  So, the recursive supply here denies the sink its supplies to
put a supply unit somewhere else back in supply.  That's robbing Peter
to pay Paul.  Drop it.
src/lib/subs/supply.c