mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: refactor BlueZ 4 transport state setting
Add transport_set_state() that encapsulates changing the variable, logging and firing the change hook. I also made a cosmetic change to the corresponding BlueZ 5 log message so that both messages have the format that I like.
This commit is contained in:
parent
15e3d828dd
commit
83ac6c5ae5
2 changed files with 17 additions and 16 deletions
|
|
@ -267,7 +267,7 @@ void pa_bluetooth_transport_set_state(pa_bluetooth_transport *t, pa_bluetooth_tr
|
|||
|
||||
old_any_connected = pa_bluetooth_device_any_transport_connected(t->device);
|
||||
|
||||
pa_log_debug("Transport %s state changed from %s to %s",
|
||||
pa_log_debug("Transport %s state: %s -> %s",
|
||||
t->path, transport_state_to_string(t->state), transport_state_to_string(state));
|
||||
|
||||
t->state = state;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue