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

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

btm_iso: Relax iso_handle check for read link quality function

Since this is rather debug function, and might be called
from some loop without a context of the connected iso's lets allow
for invalid iso_handle to be pass in that function. In case it is incorrect,
just drop the user request.

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

Change-Id: I658a10d0afbc628b6de656839dfbcf0e47ed244c
parent b7953308
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -355,7 +355,10 @@ struct iso_impl {

  void read_iso_link_quality(uint16_t iso_handle) {
    iso_base* iso = GetIsoIfKnown(iso_handle);
    LOG_ASSERT(iso != nullptr) << "No such iso connection";
    if (iso == nullptr) {
      LOG(ERROR) <<__func__ << "No such iso connection: " << +iso_handle;
      return;
    }

    btsnd_hcic_read_iso_link_quality(
        iso_handle, base::BindOnce(&iso_impl::on_iso_link_quality_read,