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 <scott@ubuntu.com>
(cherry picked from commit d33cfec625)
This commit is contained in:
Scott James Remnant 2009-05-11 22:42:32 +01:00 committed by Colin Walters
parent 5de455c0bb
commit e296855e41

View file

@ -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);