From 17541956196b13ee083852fd4124cd8cfd0928a4 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 9 Oct 2008 15:00:09 +0200 Subject: Add mechanism for adding new UUIDs from the driver side With this patch drivers can notify the core daemon that a device supports some UUID. This is useful in case we don't have a service record for a profile which the remote device initiates a connection for. --- audio/avdtp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'audio/avdtp.c') diff --git a/audio/avdtp.c b/audio/avdtp.c index 1c6f8e67..affc7fe7 100644 --- a/audio/avdtp.c +++ b/audio/avdtp.c @@ -42,7 +42,9 @@ #include "logging.h" -#include "adapter.h" +#include "../src/adapter.h" +#include "../src/device.h" + #include "device.h" #include "manager.h" #include "control.h" @@ -1061,7 +1063,7 @@ static gboolean avdtp_setconf_cmd(struct avdtp *session, } avdtp_get_peers(session, &src, &dst); - dev = manager_get_device(&src, &dst, NULL); + dev = manager_get_device(&src, &dst); if (!dev) { error("Unable to get a audio device object"); goto failed; @@ -1070,7 +1072,7 @@ static gboolean avdtp_setconf_cmd(struct avdtp *session, switch (sep->info.type) { case AVDTP_SEP_TYPE_SOURCE: if (!dev->sink) - dev->sink = sink_init(dev); + btd_device_add_uuid(dev->btd_dev, A2DP_SINK_UUID); break; case AVDTP_SEP_TYPE_SINK: /* Do source_init() here when it's implemented */ @@ -2804,7 +2806,7 @@ static void avdtp_server_cb(GIOChannel *chan, int err, const bdaddr_t *src, goto drop; } - dev = manager_get_device(src, dst, NULL); + dev = manager_get_device(src, dst); if (!dev) { error("Unable to get audio device object for %s", address); goto drop; -- cgit