aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-01-16 06:19:16 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2016-01-16 06:19:16 +0100
commit8a9a28231bba6334c383dca59f7eccd1e5075693 (patch)
tree227529d30b71347f572799279542c9c7a3042c97
parentff046ea596e7d53686ebb906820eef7fbe863f6a (diff)
downloadliberty-8a9a28231bba6334c383dca59f7eccd1e5075693.tar.gz
liberty-8a9a28231bba6334c383dca59f7eccd1e5075693.tar.xz
liberty-8a9a28231bba6334c383dca59f7eccd1e5075693.zip
Cleanup
-rw-r--r--liberty.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/liberty.c b/liberty.c
index de57812..ec54567 100644
--- a/liberty.c
+++ b/liberty.c
@@ -1180,18 +1180,6 @@ async_run (struct async *self)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-static bool
-async_manager_retry (struct async_manager *self, struct async *async)
-{
- if (async->cancelled)
- {
- if (async->destroy)
- async->destroy (async);
- return true;
- }
- return async_run (async);
-}
-
static struct async *
async_manager_dispatch_fetch (struct async_manager *self)
{
@@ -1227,7 +1215,12 @@ async_manager_dispatch (struct async_manager *self)
LIST_FOR_EACH (struct async, iter, self->delayed)
{
LIST_UNLINK (self->delayed, iter);
- if (!async_manager_retry (self, iter))
+ if (iter->cancelled)
+ {
+ if (iter->destroy)
+ iter->destroy (iter);
+ }
+ else if (!async_run (iter))
break;
}
}