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

Commit f05df7a8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I15f97d1a,I88fc3f2a into tm-d1-dev am: f78befd3

parents ee13b5f9 f78befd3
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -292,14 +292,14 @@ class CsisClientImpl : public CsisClient {
    csis_group->SetTargetLockState(CsisLockState::CSIS_STATE_UNSET);
    csis_group->SetTargetLockState(CsisLockState::CSIS_STATE_UNSET);


    int group_id = csis_group->GetGroupId();
    int group_id = csis_group->GetGroupId();
    CsisLockState current_lock_state = csis_group->GetCurrentLockState();
    /* Send unlock to previous devices. It shall be done in reverse order. */
    /* Send unlock to previous devices. It shall be done in reverse order. */
    auto prev_dev = csis_group->GetPrevDevice(csis_device);
    auto prev_dev = csis_group->GetPrevDevice(csis_device);
    while (prev_dev) {
    while (prev_dev) {
      if (prev_dev->IsConnected()) {
      if (prev_dev->IsConnected()) {
        auto prev_csis_instance = prev_dev->GetCsisInstanceByGroupId(group_id);
        auto prev_csis_instance = prev_dev->GetCsisInstanceByGroupId(group_id);
        LOG_ASSERT(prev_csis_instance) << " prev_csis_instance does not exist!";
        LOG_ASSERT(prev_csis_instance) << " prev_csis_instance does not exist!";
        SetLock(prev_dev, prev_csis_instance, current_lock_state);
        SetLock(prev_dev, prev_csis_instance,
                CsisLockState::CSIS_STATE_UNLOCKED);
      }
      }
      prev_dev = csis_group->GetPrevDevice(prev_dev);
      prev_dev = csis_group->GetPrevDevice(prev_dev);
    }
    }
@@ -381,7 +381,7 @@ class CsisClientImpl : public CsisClient {
          /* Somebody else managed to lock it.
          /* Somebody else managed to lock it.
           * Unlock previous devices
           * Unlock previous devices
           */
           */
          HandleCsisLockProcedureError(csis_group, device);
          HandleCsisLockProcedureError(csis_group, next_dev);
          return;
          return;
        }
        }
        SetLock(next_dev, next_csis_inst, CsisLockState::CSIS_STATE_LOCKED);
        SetLock(next_dev, next_csis_inst, CsisLockState::CSIS_STATE_LOCKED);