diff options
author | Wim Taymans <wtaymans@redhat.com> | 2019-02-21 12:14:25 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2019-02-21 12:14:25 +0100 |
commit | 98463b689b9bffc912f719aa20ea28c8df0fe412 (patch) | |
tree | 1ba4ae0bed5a1dabe08460f7d1707724e671d403 /src/examples/export-source.c | |
parent | a3ca2df0fef4712ee513aad51d147e46b9087382 (diff) |
node: improve pending results
Make a special function for pending results to make it clear that it
is different from normal results. Don't pass result code to result
function, it is not useful because since the callback is called, all
must be fine.
The spa_pending is removed from the list right before the callback
and can thus be freed in the callback. Pass the spa_pending in
the pending callback so that extra data can be added that way.
Reuse spa_pending objects in link and nodes instead of allocating. We
always only have one pending operation and we can cancel any pending
previous operation by removing the pending.
Diffstat (limited to 'src/examples/export-source.c')
-rw-r--r-- | src/examples/export-source.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/examples/export-source.c b/src/examples/export-source.c index 3370aefe..08465d4a 100644 --- a/src/examples/export-source.c +++ b/src/examples/export-source.c @@ -262,7 +262,7 @@ static int impl_port_enum_params(struct spa_node *node, if (spa_pod_filter(&b, &result.param, param, filter) < 0) goto next; - if ((res = func(data, count, 1, &result)) != 0) + if ((res = func(data, count, &result)) != 0) return res; if (++count != num) |