From: Markus Armbruster Date: Sat, 18 Apr 2009 06:41:28 +0000 (+0200) Subject: Fix tend land not to wipe out concurrent updates X-Git-Tag: hvy-plastic-1.4~1 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=f571a37cde0f44e5b0ed0b99f02c3003f9c4c5af Fix tend land not to wipe out concurrent updates Fix tend_land() to bail out if the tender changed while tend_land() slept for the last argument (receiving ship). (cherry picked from commit 1ee02194c517e773888f2644c5dde30ac14f6f20) --- diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index 2c7dba377..c859d4881 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -227,7 +227,7 @@ tend_land(struct shpstr *tenderp, char *units) if (!snxtitem(&targets, EF_SHIP, player->argp[4], "Ship to be tended? ")) return RET_FAIL; - if (!check_land_ok(&land)) + if (!check_ship_ok(tenderp) || !check_land_ok(&land)) return RET_SYN; while (nxtitem(&targets, &target)) { if (!player->owner &&