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

Commit 714d9838 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "csis: Fix bonding dual mode devices" into main am: 89d04b14 am: 000914d7

parents 86cf2b82 000914d7
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -1314,6 +1314,18 @@ class CsisClientImpl : public CsisClient {
      return;
    }

    /* Make sure device is not already bonded which could
     * be a case for dual mode devices where
     */
    tBTM_SEC_DEV_REC* p_dev = btm_find_dev(result->bd_addr);
    if (p_dev && p_dev->is_le_link_key_known()) {
      LOG_VERBOSE(
          "Device %s already bonded. Identity address: %s",
          ADDRESS_TO_LOGGABLE_CSTR(result->bd_addr),
          ADDRESS_TO_LOGGABLE_CSTR(p_dev->ble.identity_address_with_type));
      return;
    }

    auto all_rsi = GetAllRsiFromAdvertising(result);
    if (all_rsi.empty()) return;

@@ -1454,6 +1466,18 @@ class CsisClientImpl : public CsisClient {
      return;
    }

    /* Make sure device is not already bonded which could
     * be a case for dual mode devices where
     */
    tBTM_SEC_DEV_REC* p_dev = btm_find_dev(result->bd_addr);
    if (p_dev && p_dev->is_le_link_key_known()) {
      LOG_VERBOSE(
          "Device %s already bonded. Identity address: %s",
          ADDRESS_TO_LOGGABLE_CSTR(result->bd_addr),
          ADDRESS_TO_LOGGABLE_CSTR(p_dev->ble.identity_address_with_type));
      return;
    }

    auto all_rsi = GetAllRsiFromAdvertising(result);
    if (all_rsi.empty()) return;