summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index a35f79a4..e7f1c1fa 100644
--- a/src/device.c
+++ b/src/device.c
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
+#include <errno.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
@@ -1122,6 +1123,9 @@ int device_browse(struct btd_device *device, DBusConnection *conn,
uuid_t uuid;
bt_callback_t cb;
+ if (device->discov_active)
+ return -EBUSY;
+
adapter_get_address(adapter, &src);
req = g_new0(struct browse_req, 1);