summaryrefslogtreecommitdiff
path: root/src/adapter.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-06-09 11:08:23 -0700
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2022-06-13 17:44:16 -0700
commit3fb4e1cca2eaddc413d1ebed9d862084351efdbc (patch)
tree6f7ae6dd2c1fdceac197716000a4a1cb37cabf89 /src/adapter.c
parent12d6fd9b9ddc8a7e98bdba744fabb96fefb08e3c (diff)
downloadbluez-3fb4e1cca2eaddc413d1ebed9d862084351efdbc.tar.gz
device: Add connectable flag to bearer state
This adds connectable flag to state so it can be used to detect which is the last seen connectable bearer.
Diffstat (limited to 'src/adapter.c')
-rw-r--r--src/adapter.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/adapter.c b/src/adapter.c
index f7faaa263..3e0b3049a 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -3444,7 +3444,7 @@ static void device_connect_cb(GIOChannel *io, GError *gerr, gpointer user_data)
/* continue with service discovery and connection */
btd_device_set_temporary(device, false);
- device_update_last_seen(device, data->dst_type);
+ device_update_last_seen(device, data->dst_type, true);
if (data->dst_type != BDADDR_BREDR){
g_io_channel_set_close_on_unref(io, FALSE);
@@ -6954,7 +6954,7 @@ void btd_adapter_update_found_device(struct btd_adapter *adapter,
return;
}
- device_update_last_seen(dev, bdaddr_type);
+ device_update_last_seen(dev, bdaddr_type, !not_connectable);
/*
* FIXME: We need to check for non-zero flags first because
@@ -6966,7 +6966,7 @@ void btd_adapter_update_found_device(struct btd_adapter *adapter,
!(eir_data.flags & EIR_BREDR_UNSUP)) {
device_set_bredr_support(dev);
/* Update last seen for BR/EDR in case its flag is set */
- device_update_last_seen(dev, BDADDR_BREDR);
+ device_update_last_seen(dev, BDADDR_BREDR, !not_connectable);
}
if (eir_data.name != NULL && eir_data.name_complete)