From b623751c2e46ac7c77164d0105e61e938b9be6ec Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Mon, 11 May 2009 22:42:50 +0100 Subject: [PATCH 08/11] 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 --- bus/expirelist.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bus/expirelist.c b/bus/expirelist.c index 038cfee..8cf1fad 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; -- 1.6.0.4