summaryrefslogtreecommitdiffstats
path: root/audio/headset.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/headset.c')
-rw-r--r--audio/headset.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c
index 77498d73..0a7f18ed 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -1466,6 +1466,10 @@ static DBusMessage *hs_connect(DBusConnection *conn, DBusMessage *msg,
return g_dbus_create_error(msg, ERROR_INTERFACE ".NotReady",
"Telephony subsystem not ready");
+ if (!manager_allow_headset_connection(&device->src))
+ return g_dbus_create_error(msg, ERROR_INTERFACE ".NotAllowed",
+ "Too many connected devices");
+
err = rfcomm_connect(device, NULL, NULL, NULL);
if (err < 0)
return g_dbus_create_error(msg, ERROR_INTERFACE