From: Markus Armbruster Date: Sun, 20 Nov 2011 18:11:04 +0000 (+0100) Subject: Clean up how telegram_is_new() detects production report X-Git-Tag: v4.3.29~18 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=35e897f70ba61eedacf14f435a8609d247610113 Clean up how telegram_is_new() detects production report Test for TEL_UPDATE, not update_running. --- diff --git a/src/lib/subs/wu.c b/src/lib/subs/wu.c index 5021cd0c0..08bfc4a0c 100644 --- a/src/lib/subs/wu.c +++ b/src/lib/subs/wu.c @@ -67,7 +67,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_running && /* updates can take a long time */ + is_new |= tel->tel_type != TEL_UPDATE && abs(tel->tel_date - last_tel[to].tel_date) > TEL_SECONDS; last_tel[to].tel_type = tel->tel_type;