summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/unix.c')
-rw-r--r--audio/unix.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/audio/unix.c b/audio/unix.c
index d71c420a..f3c6e6aa 100644
--- a/audio/unix.c
+++ b/audio/unix.c
@@ -765,6 +765,8 @@ static void handle_getcapabilities_req(struct unix_client *client,
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))
@@ -773,8 +775,12 @@ static void handle_getcapabilities_req(struct unix_client *client,
}
dev = manager_find_device(&bdaddr, client->interface, TRUE);
- if (!dev)
- dev = manager_find_device(&bdaddr, client->interface, FALSE);
+ if (!dev) {
+ if (req->flags & BT_FLAG_AUTOCONNECT)
+ dev = manager_find_device(&bdaddr, client->interface, FALSE);
+ else
+ goto failed;
+ }
if (!dev)
goto failed;