mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-15 22:05:28 -05:00
bluez5: synchronize transport state after acquire of an acquired transport
With keepalive enabled, we need to emit state change event on acquire similarly as we do if refcount was already positive. Co-authored-by: Martin Geier <martin.geier@streamunlimited.com>
This commit is contained in:
parent
63129dd3dc
commit
7dd2c60b12
1 changed files with 6 additions and 2 deletions
|
|
@ -3419,8 +3419,12 @@ int spa_bt_transport_acquire(struct spa_bt_transport *transport, bool optional)
|
|||
|
||||
if (!transport->acquired)
|
||||
res = spa_bt_transport_impl(transport, acquire, 0, optional);
|
||||
else
|
||||
res = 0;
|
||||
else {
|
||||
/* keepalive */
|
||||
transport->acquire_refcount = 1;
|
||||
spa_bt_transport_emit_state_changed(transport, transport->state, transport->state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (res >= 0) {
|
||||
transport->acquire_refcount = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue