diff options
author | Scott James Remnant <scott@ubuntu.com> | 2009-05-11 22:42:32 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-07-14 15:38:11 -0400 |
commit | e296855e414b58bed3639cfde61dc14cfd4f57c2 (patch) | |
tree | 60c0ac2ba20d747d375c5c3b43c39e4458dda88d | |
parent | 5de455c0bbbb5dfbb651ad88140f14aac99d4e2f (diff) | |
download | dbus-e296855e414b58bed3639cfde61dc14cfd4f57c2.tar.gz |
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 d33cfec625bf769384cc370ad0ea660c9993aa15)
-rw-r--r-- | bus/expirelist.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |