diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-06-02 14:18:52 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-06-13 10:20:33 -0700 |
commit | 25dd5613d549010952550df4f6bd435e2bd5d101 (patch) | |
tree | 8108972111a0cfe9e8c3a6d4c16d253bd2277a41 /monitor/packet.c | |
parent | 60f18a689474fa7d8a355d4318c22d9261ab29f3 (diff) | |
download | bluez-25dd5613d549010952550df4f6bd435e2bd5d101.tar.gz |
monitor: Stop spamming logs when GATT db cannot be loaded
This stops calling hci_devba everytime the GATT db needs to be loaded
since that causes a raw socket to be open to read back the address
pointed by the index, instead this is done only once at assign_handle
and store in packet_conn_data.
Diffstat (limited to 'monitor/packet.c')
-rw-r--r-- | monitor/packet.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/monitor/packet.c b/monitor/packet.c index c7739fba5..bd9efd2c7 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -178,6 +178,9 @@ static void assign_handle(uint16_t index, uint16_t handle, uint8_t type, for (i = 0; i < MAX_CONN; i++) { if (conn_list[i].handle == 0x0000) { + if (hci_devba(index, (bdaddr_t *)conn_list[i].src) < 0) + return; + conn_list[i].index = index; conn_list[i].handle = handle; conn_list[i].type = type; |