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

Commit 207b3e45 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "csis: Improve notification about member availability"

parents 6c741b7c cc56c941
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1224,7 +1224,7 @@ class CsisClientImpl : public CsisClient {

    auto csis_device = FindDeviceByAddress(result->bd_addr);
    if (csis_device) {
      DLOG(INFO) << __func__ << " Drop same device .." << result->bd_addr;
      LOG_DEBUG("Drop known device %s", result->bd_addr.ToString().c_str());
      return;
    }

@@ -1235,8 +1235,15 @@ class CsisClientImpl : public CsisClient {
    for (auto& group : csis_groups_) {
      for (auto& rsi : all_rsi) {
        if (group->IsRsiMatching(rsi)) {
          DLOG(INFO) << " Found set member in background scan "
                     << result->bd_addr;
          LOG_INFO("Device %s match to group id %d",
                   result->bd_addr.ToString().c_str(), group->GetGroupId());
          if (group->GetDesiredSize() > 0 &&
              (group->GetCurrentSize() == group->GetDesiredSize())) {
            LOG_WARN(
                "Group is already completed. Some other device use same SIRK");
            break;
          }

          callbacks_->OnSetMemberAvailable(result->bd_addr,
                                           group->GetGroupId());
          break;