summaryrefslogtreecommitdiff
path: root/src/adapter.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-11-03 22:02:53 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-11-03 22:05:50 +0200
commit25dc0c5026442edee1ef0b987aca723ea3b593fb (patch)
tree3d9201c6cfd722fdbfde2696ed80c0b77c644757 /src/adapter.h
parent778e182c6438962ff641e66b1a867aa16bd27414 (diff)
downloadbluez-25dc0c5026442edee1ef0b987aca723ea3b593fb.tar.gz
core: Remove unnecessary LE connect for kernels that don't need it
From mgmt version 1.4 onward the ATT server socket gets appropriate notifications also for outgoing connections triggered by mgmt_pair_device. This patch adds a check for the mgmt version to not unnecessarily create the LE client socket first. For now this also fixes a potential race condition in the kernel where the socket connect LE scan disabling will fail because of a preceding mgmt_stop_discovery trying to do the same thing. Since mgmt commands (unlike the socket connect) are serialized the race cannot happen with the mgmt_stop_discover + mgmt_pair_device combination.
Diffstat (limited to 'src/adapter.h')
-rw-r--r--src/adapter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/adapter.h b/src/adapter.h
index 8f4098a50..737479f14 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -225,3 +225,5 @@ gboolean btd_adapter_check_oob_handler(struct btd_adapter *adapter);
void btd_adapter_for_each_device(struct btd_adapter *adapter,
void (*cb)(struct btd_device *device, void *data),
void *data);
+
+bool btd_le_connect_before_pairing(void);