From e296855e414b58bed3639cfde61dc14cfd4f57c2 Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Mon, 11 May 2009 22:42:32 +0100 Subject: Explicitly check for zero time fields. * bus/expirelist.c (do_expiration_with_current_time): If the item added time fields are both zero, always expire. Signed-off-by: Scott James Remnant (cherry picked from commit d33cfec625bf769384cc370ad0ea660c9993aa15) --- bus/expirelist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bus/expirelist.c b/bus/expirelist.c index d718d9ff..038cfee3 100644 --- a/bus/expirelist.c +++ b/bus/expirelist.c @@ -157,7 +157,8 @@ do_expiration_with_current_time (BusExpireList *list, item->added_tv_usec, tv_sec, tv_usec); - if (elapsed >= (double) list->expire_after) + if (((item->added_tv_sec == 0) && (item->added_tv_usec == 0)) || + (elapsed >= (double) list->expire_after)) { _dbus_verbose ("Expiring an item %p\n", item); -- cgit