summaryrefslogtreecommitdiffstats
path: root/bus/expirelist.c
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-10-28 23:51:24 +0000
committerHavoc Pennington <hp@redhat.com>2003-10-28 23:51:24 +0000
commitbebc830fc47cbf191f7518dfd0cd88c4938c2dbf (patch)
tree929dcab1c067ca35be2d51ce8a729098bf33dc69 /bus/expirelist.c
parente11ae7246655e59f8e04d1ffcb3788176a6d98b8 (diff)
2003-10-28 Havoc Pennington <hp@redhat.com>
* bus/expirelist.c (do_expiration_with_current_time): detect failure of the expire_func due to OOM * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM * bus/dispatch.c (check_send_exit_to_service): fix to handle the NoReply error that's now created by the bus when the service exits
Diffstat (limited to 'bus/expirelist.c')
-rw-r--r--bus/expirelist.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/bus/expirelist.c b/bus/expirelist.c
index a1ce226d..3725bdd9 100644
--- a/bus/expirelist.c
+++ b/bus/expirelist.c
@@ -143,11 +143,16 @@ do_expiration_with_current_time (BusExpireList *list,
_dbus_verbose ("Expiring an item %p\n", item);
/* If the expire function fails, we just end up expiring
- * this item next time we walk through the list. Which is in
- * indeterminate time since we don't know what next_interval
- * will be.
+ * this item next time we walk through the list. This would
+ * be an indeterminate time normally, so we set up the
+ * next_interval to be "shortly" (just enough to avoid
+ * a busy loop)
*/
- (* list->expire_func) (list, link, list->data);
+ if (!(* list->expire_func) (list, link, list->data))
+ {
+ next_interval = _dbus_get_oom_wait ();
+ break;
+ }
}
else
{
@@ -205,7 +210,7 @@ typedef struct
int expire_count;
} TestExpireItem;
-static void
+static dbus_bool_t
test_expire_func (BusExpireList *list,
DBusList *link,
void *data)
@@ -215,6 +220,8 @@ test_expire_func (BusExpireList *list,
t = (TestExpireItem*) link->data;
t->expire_count += 1;
+
+ return TRUE;
}
static void