Summary: adv_data_get() called after adv_data_phase_done()
Submitted by: cazfi
Submitted on: Fri 04 Feb 2011 04:25:32 PM EET
Severity: 3 - Normal
Priority: 5 - Normal
Status: In Progress
Assigned to: cazfi
Discussion Lock: Any
Operating System: None
Planned Release: 2.3.0, 2.4.0
While debugging patch #2352, I have discovered that adv_data_get() gets
sometimes called outside adv_data_phase_init() / adv_data_phase_done() pair.
This breaks things if there is need to recalculate the data. In that case
adv_data_get() calls adv_data_phase_done(), which does nothing as data phase
is already closed, and then adv_data_phase_init() which leaves data phase
open. So, data phase is left open when adv_data_get() returns even if it was
closed when adv_data_get() was first called. When adv_data_phase_init() is
then called for refreshing data for new turn, it detects that data phase is
already open and does nothing, leaving data outdated.
These calls happen in TRUNK at least, don't know about S2_3. Anyway,
adv_data_get() should be protected against errors like this in S2_3 too.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list