(update_running): New.
(update_run): Set it. Replace incorrect uses of update_pending by update_running, fixing buggy behavior while the update was trying to gain control: (sct_do_upd_mob, shp_do_upd_mob, lnd_do_upd_mob, pln_do_upd_mob): MOB_ACCESS mobility update was skipped. (telegram_is_new): Fix recognition of new telegrams by timestamp. (wu): Bulletins got misfiled as production reports. (shp_nav): Sail path got ignored. (setrel): Declaration of war failed silently with SLOW_WAR enabled. Messages got suppressed. (PR, mpr): Messages got misdirected to bulletins.
This commit is contained in:
parent
c1a0a42024
commit
e9cfbdc241
7 changed files with 33 additions and 14 deletions
|
@ -74,7 +74,7 @@ telegram_is_new(natid to, struct telstr *tel)
|
|||
|
||||
is_new |= tel->tel_type != last_tel[to].tel_type;
|
||||
is_new |= tel->tel_from != last_tel[to].tel_from;
|
||||
is_new |= !update_pending && /* sometimes updates take a long time */
|
||||
is_new |= !update_running && /* updates can take a long time */
|
||||
abs(tel->tel_date - last_tel[to].tel_date) > TEL_SECONDS;
|
||||
|
||||
last_tel[to].tel_type = tel->tel_type;
|
||||
|
@ -104,7 +104,7 @@ wu(natid from, natid to, char *format, ...)
|
|||
(void)vsprintf(buf, format, ap);
|
||||
va_end(ap);
|
||||
np = getnatp(from);
|
||||
if (update_pending)
|
||||
if (update_running)
|
||||
return typed_wu(from, to, buf, TEL_UPDATE);
|
||||
else if (np->nat_stat == STAT_GOD)
|
||||
return typed_wu(from, to, buf, TEL_BULLETIN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue