mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-15 08:14:28 +08:00
avctp: Remove double looking for audio device
There is no need to double call for manager_get_audio_device with toggled create flag. manager_get_audio_device with create set to true will only create new audio device if matching one was not found.
This commit is contained in:
parent
cd959f4cbc
commit
d350a5cefe
@ -1132,15 +1132,11 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data)
|
||||
if (session == NULL)
|
||||
return;
|
||||
|
||||
dev = manager_get_audio_device(device, FALSE);
|
||||
if (!dev) {
|
||||
dev = manager_get_audio_device(device, TRUE);
|
||||
if (!dev) {
|
||||
error("Unable to get audio device object for %s",
|
||||
address);
|
||||
error("Unable to get audio device object for %s", address);
|
||||
goto drop;
|
||||
}
|
||||
}
|
||||
|
||||
if (dev->control == NULL) {
|
||||
btd_device_add_uuid(dev->btd_dev, AVRCP_REMOTE_UUID);
|
||||
|
Loading…
Reference in New Issue
Block a user