summaryrefslogtreecommitdiff
path: root/bus/expirelist.c
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-05-11 22:42:50 +0100
committerScott James Remnant <scott@ubuntu.com>2009-05-28 11:47:35 +0200
commitd672d0320628e93a247eeff89945c81926a42163 (patch)
treec2414e0cd29a30c5973b83fb3d3a2ad405ef45e8 /bus/expirelist.c
parentd33cfec625bf769384cc370ad0ea660c9993aa15 (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>
Diffstat (limited to 'bus/expirelist.c')
-rw-r--r--bus/expirelist.c4
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;