mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
impl-node: don't pass the -EBUSY to the caller
Let the caller receive EBUSY from the _set_state method instead of an error code to make sure it doesn't go into error.
This commit is contained in:
parent
9bf6fa05d1
commit
dee2a51eb0
1 changed files with 2 additions and 3 deletions
|
|
@ -2257,11 +2257,10 @@ int pw_impl_node_set_state(struct pw_impl_node *node, enum pw_node_state state)
|
|||
/* driver nodes return EBUSY to add a -EBUSY to the work queue. This
|
||||
* will wait until all previous items in the work queue are
|
||||
* completed */
|
||||
if (res == EBUSY)
|
||||
res = -res;
|
||||
impl->pending_state = state;
|
||||
impl->pending_id = pw_work_queue_add(impl->work,
|
||||
node, res, on_state_complete, SPA_INT_TO_PTR(state));
|
||||
node, res == EBUSY ? -EBUSY : res,
|
||||
on_state_complete, SPA_INT_TO_PTR(state));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue