summaryrefslogtreecommitdiffstats
path: root/src/direct_bt/L2CAPComm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/direct_bt/L2CAPComm.cpp')
-rw-r--r--src/direct_bt/L2CAPComm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/direct_bt/L2CAPComm.cpp b/src/direct_bt/L2CAPComm.cpp
index d974d35a..b7054f67 100644
--- a/src/direct_bt/L2CAPComm.cpp
+++ b/src/direct_bt/L2CAPComm.cpp
@@ -97,8 +97,8 @@ int L2CAPComm::l2cap_close_dev(int dd)
// *************************************************
// *************************************************
-L2CAPComm::L2CAPComm(std::shared_ptr<DBTDevice> device, const uint16_t psm, const uint16_t cid, const bool pubaddr)
-: device(device), deviceString(device->getAddressString()), psm(psm), cid(cid), pubaddr(pubaddr),
+L2CAPComm::L2CAPComm(std::shared_ptr<DBTDevice> device, const uint16_t psm, const uint16_t cid)
+: device(device), deviceString(device->getAddressString()), psm(psm), cid(cid),
_dd(-1), isConnected(false), hasIOError(false), interruptFlag(false), tid_connect(0)
{ }
@@ -132,7 +132,7 @@ bool L2CAPComm::connect() {
req.l2_psm = cpu_to_le(psm);
req.l2_bdaddr = device->getAddress();
req.l2_cid = cpu_to_le(cid);
- req.l2_bdaddr_type = pubaddr ? BDADDR_LE_PUBLIC : BDADDR_LE_RANDOM;
+ req.l2_bdaddr_type = device->getAddressType();
while( !interruptFlag ) {
// blocking