Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da7bd664 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Merge "Log when setting illegal address type in security record" am:...

Merge "Log when setting illegal address type in security record" am: be4fa976 am: fd9dbbf0 am: bf3cae97

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2086683



Change-Id: I6869484e6b0c205311b6f930967368dda44ea58d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f783bbf7 bf3cae97
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ typedef struct {
  uint32_t local_counter; /* local sign counter for sending signed write cmd*/
} tBTM_SEC_BLE_KEYS;

typedef struct {
struct tBTM_SEC_BLE {
  RawAddress pseudo_addr; /* LE pseudo address of the device if different from
                          device address  */
 private:
@@ -101,7 +101,12 @@ typedef struct {
 public:
  tBLE_ADDR_TYPE AddressType() const { return ble_addr_type_; }
  void SetAddressType(tBLE_ADDR_TYPE ble_addr_type) {
    if (is_ble_addr_type_known(ble_addr_type)) ble_addr_type_ = ble_addr_type;
    if (is_ble_addr_type_known(ble_addr_type)) {
      ble_addr_type_ = ble_addr_type;
    } else {
      LOG(ERROR) << "Please don't store illegal addresses into security record:"
                 << AddressTypeText(ble_addr_type);
    }
  }

  tBLE_BD_ADDR identity_address_with_type;
@@ -121,7 +126,8 @@ typedef struct {

  tBTM_LE_KEY_TYPE key_type; /* bit mask of valid key types in record */
  tBTM_SEC_BLE_KEYS keys;    /* LE device security info in peripheral rode */
} tBTM_SEC_BLE;
};
typedef struct tBTM_SEC_BLE tBTM_SEC_BLE;

enum : uint16_t {
  BTM_SEC_AUTHENTICATED = 0x0002,