summaryrefslogtreecommitdiffstats
path: root/audio/unix.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-01-30 11:44:57 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-01-30 11:44:57 +0000
commit9fa2613525721908ec43189794fe99828b8a4f51 (patch)
treee464dd48a5565bab81b230ffbf7a2fd20a03ee1e /audio/unix.c
parent4b8bfb24c7666cb0b6eb26abe9a7d5072e3f9c4e (diff)
Add autoconnect config option to IPC and alsa
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;