mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-17 01:04:40 +08:00
Make sure audio driver is probed when handling an incoming connections.
Driver should be probed when adding a reference so that can be released when the device is temporary using .remove callback. In case of AVDTP as it is not possible to verify if it is a source or sink it uses the same uuid used for authorization request which is advance audio uuid.
This commit is contained in:
parent
a6a65ceb00
commit
24bd55a4a3
@ -2080,11 +2080,16 @@ static void avdtp_confirm_cb(GIOChannel *chan, gpointer data)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
dev = manager_get_device(&src, &dst, FALSE);
|
||||
if (!dev) {
|
||||
dev = manager_get_device(&src, &dst, 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;
|
||||
}
|
||||
btd_device_add_uuid(dev->btd_dev, ADVANCED_AUDIO_UUID);
|
||||
}
|
||||
|
||||
session->io = g_io_channel_ref(chan);
|
||||
avdtp_set_state(session, AVDTP_SESSION_STATE_CONNECTING);
|
||||
|
@ -50,6 +50,7 @@
|
||||
#include "error.h"
|
||||
#include "uinput.h"
|
||||
#include "adapter.h"
|
||||
#include "../src/device.h"
|
||||
#include "device.h"
|
||||
#include "manager.h"
|
||||
#include "avdtp.h"
|
||||
@ -696,8 +697,11 @@ static void avctp_confirm_cb(GIOChannel *chan, gpointer data)
|
||||
goto drop;
|
||||
}
|
||||
|
||||
if (!dev->control) {
|
||||
btd_device_add_uuid(dev->btd_dev, AVRCP_REMOTE_UUID);
|
||||
if (!dev->control)
|
||||
dev->control = control_init(dev, AV_REMOTE_SVCLASS_ID);
|
||||
goto drop;
|
||||
}
|
||||
|
||||
control = dev->control;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user