Clean up how telegram_is_new() detects production report
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 20 Nov 2011 18:11:04 +0000 (19:11 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 29 Dec 2011 10:47:06 +0000 (11:47 +0100)
Test for TEL_UPDATE, not update_running.

src/lib/subs/wu.c

index 5021cd0c0e20f09dfa078eb4632c3c3a4274aa18..08bfc4a0c735006c2e03d6fa66c32bdf35165070 100644 (file)
@@ -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;