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

Commit fcea2ba9 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski
Browse files

csis: Fix active scan for set member

Scanning sessin was incoretly closed after first device found, no matter
if it belongs to the group or not. This is incorrect and this patch
fixes it.

Bug: 150670922
Tag: #feature
Sponsor: jpawlowski@
Test: atest --host bluetooth_csis_test

Change-Id: Iafc16e2cbb9e670bd21d6a44283fb03b39d46b67
parent 4c474384
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1099,12 +1099,14 @@ class CsisClientImpl : public CsisClient {
      DLOG(INFO) << "Found set member " << result->bd_addr;
      callbacks_->OnSetMemberAvailable(result->bd_addr,
                                       csis_group->GetGroupId());
    }

    /* Switch back to the opportunistic observer mode */
      /* Switch back to the opportunistic observer mode.
       * When second device will pair, csis will restart active scan
       * to search more members if needed */
      CsisActiveObserverSet(false);
      csis_group->SetDiscoveryState(CsisDiscoveryState::CSIS_DISCOVERY_IDLE);
    }
  }

  void CsisActiveObserverSet(bool enable) {
    LOG(INFO) << __func__ << " CSIS Discovery SET: " << enable;