]> git.pond.sub.org Git - empserver/commit
Fix racy detection of ally rejecting flashes
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 5 Feb 2011 10:09:37 +0000 (11:09 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Feb 2011 15:06:23 +0000 (16:06 +0100)
commitfc633a4f1fe8900b08fca8e9975b38fcfbd23808
treee43efbf7e6a8dc739cb11cedee14c8a438b237cd
parent53a4fc6e263da89233de3287e1372fbcef2b5f2d
Fix racy detection of ally rejecting flashes

sendmessage() checked NF_FLASH on two places: when deciding whether to
send the message, and later when telling the player why it didn't send
a flash.  This can race with the toggle command as follows: if a flash
could not be sent because the recipient's NF_FLASH was off, and the
recipient toggled it on before the flag was checked again, the flash
command claimed the sender wasn't logged on.
src/lib/commands/flash.c