diff options
author | Scott James Remnant <scott@ubuntu.com> | 2009-05-11 22:42:50 +0100 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-07-14 15:38:18 -0400 |
commit | ce326587c33d1d579785b6d8c18699964c1bc93a (patch) | |
tree | 01eb36173ea21ba3f887cfa201f9bb14cf520409 | |
parent | e296855e414b58bed3639cfde61dc14cfd4f57c2 (diff) |
Expire list timeout may be negative for no expiry.
* bus/expirelist.c (do_expiration_with_current_time): Don't check for
expiry if expire_after is negative, will just disable the expiry timer
after the call.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit d672d0320628e93a247eeff89945c81926a42163)
-rw-r--r-- | bus/expirelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bus/expirelist.c b/bus/expirelist.c index 038cfee3..8cf1fad6 100644 --- a/bus/expirelist.c +++ b/bus/expirelist.c @@ -158,7 +158,7 @@ do_expiration_with_current_time (BusExpireList *list, tv_sec, tv_usec); if (((item->added_tv_sec == 0) && (item->added_tv_usec == 0)) || - (elapsed >= (double) list->expire_after)) + ((list->expire_after > 0) && (elapsed >= (double) list->expire_after))) { _dbus_verbose ("Expiring an item %p\n", item); @@ -174,7 +174,7 @@ do_expiration_with_current_time (BusExpireList *list, break; } } - else + else if (list->expire_after > 0) { double to_wait; |