summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-02-21 15:07:35 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2014-02-21 16:15:56 +0200
commita9f523e0c3627ea2ea3c894c2d34b756ee533637 (patch)
tree8131637cbee6d1db8c7197742dcf03a1c28fa3d1 /profiles
parente87dadbe1bbfa39feead7488a06605e0cda29ecb (diff)
downloadbluez-a9f523e0c3627ea2ea3c894c2d34b756ee533637.tar.gz
core: Split LE and BR/EDR states for devices
For dual mode devices there are several state variables that are independent for each bearer. This patch splits these states up into two separate variable groups in btd_device and tracks the values based on what kind of connection is in question. The information is also used to select which bearer to use with Device1.Connect and Device1.Pair. The basic rule is that the bearer that's not connected/paired is selected, or then the bearer over which the device was last seen is selected.
Diffstat (limited to 'profiles')
-rw-r--r--profiles/gatt/gas.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/profiles/gatt/gas.c b/profiles/gatt/gas.c
index db1e29d89..c0526e52f 100644
--- a/profiles/gatt/gas.c
+++ b/profiles/gatt/gas.c
@@ -177,6 +177,7 @@ done:
static void indication_cb(const uint8_t *pdu, uint16_t len, gpointer user_data)
{
+ uint8_t bdaddr_type;
struct gas *gas = user_data;
uint16_t start, end, olen;
size_t plen;
@@ -197,7 +198,8 @@ static void indication_cb(const uint8_t *pdu, uint16_t len, gpointer user_data)
olen = enc_confirmation(opdu, plen);
g_attrib_send(gas->attrib, 0, opdu, olen, NULL, NULL, NULL);
- if (device_is_bonded(gas->device) == FALSE) {
+ bdaddr_type = btd_device_get_bdaddr_type(gas->device);
+ if (!device_is_bonded(gas->device, bdaddr_type)) {
DBG("Ignoring Service Changed: device is not bonded");
return;
}