summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-09-24 19:36:57 -0700
committerJohan Hedberg <johan.hedberg@nokia.com>2008-09-24 19:36:57 -0700
commit1af86fb9d1717a27b3a776fc0fb62c96045ccb9a (patch)
tree0df314bc6a20b2ab7b64e677252310a51bb0cf47
parentea4268b7067bf3c8588f1ec54b0add9a0f49f385 (diff)
device_browse should fail if there's a SDP discovery already active
-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);