summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-28 17:15:27 -0300
committerLuiz Augusto von Dentz <luiz.dentz@indt.org.br>2008-07-28 17:15:27 -0300
commit12d81a98fe65d109c0b1caa242e96b005bcc8209 (patch)
tree90886d363a308e8768b4d484e5a5516102524ca8 /audio/unix.c
parentd2fd09864d8b9e5289f0a6ab230063b32f661048 (diff)
Cleanup audio manager.
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/audio/unix.c b/audio/unix.c
index 93f5788b..10e6021e 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -744,16 +744,6 @@ failed:
unix_ipc_error(client, BT_STREAMSTOP_RSP, EIO);
}
-static void create_cb(struct audio_device *dev, void *user_data)
-{
- struct unix_client *client = user_data;
-
- if (!dev)
- unix_ipc_error(client, BT_GETCAPABILITIES_RSP, EIO);
- else
- start_discovery(dev, client);
-}
-
static void handle_getcapabilities_req(struct unix_client *client,
struct bt_getcapabilities_req *req)
{
@@ -772,15 +762,8 @@ static void handle_getcapabilities_req(struct unix_client *client,
else if (req->transport == BT_CAPABILITIES_TRANSPORT_A2DP)
client->interface = g_strdup(AUDIO_SINK_INTERFACE);
- if (!manager_find_device(&bdaddr, NULL, FALSE)) {
- if (!(req->flags & BT_FLAG_AUTOCONNECT))
- goto failed;
- if (!bacmp(&bdaddr, BDADDR_ANY))
- goto failed;
- if (!manager_create_device(&bdaddr, create_cb, client))
- goto failed;
- return;
- }
+ if (!manager_find_device(&bdaddr, NULL, FALSE))
+ goto failed;
dev = manager_find_device(&bdaddr, client->interface, TRUE);
if (!dev) {
@@ -918,13 +901,8 @@ static void handle_setconfiguration_req(struct unix_client *client,
}
}
- if (!manager_find_device(&bdaddr, NULL, FALSE)) {
- if (!bacmp(&bdaddr, BDADDR_ANY))
- goto failed;
- if (!manager_create_device(&bdaddr, create_cb, client))
- goto failed;
- return;
- }
+ if (!manager_find_device(&bdaddr, NULL, FALSE))
+ goto failed;
dev = manager_find_device(&bdaddr, client->interface, TRUE);
if (!dev)