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

Commit 999945b4 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

stack::rfcomm::PORT_IsOpening Remove unnecessary boolean check am: bdbe9e8b

parents f8673cf2 bdbe9e8b
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -505,21 +505,19 @@ bool PORT_IsOpening(RawAddress* bd_addr) {
    }

    if (multiplexer_cb.state == RFC_MX_STATE_CONNECTED) {
      bool found_port = false;
      tPORT* p_port = nullptr;

      for (tPORT& port : rfc_cb.port.port) {
        if (port.rfc.p_mcb == &multiplexer_cb) {
          found_port = true;
          p_port = &port;
          break;
        }
      }

      log::info("RFC_MX_STATE_CONNECTED, found_port={}, tRFC_PORT_STATE={}",
                found_port, p_port != nullptr ? p_port->rfc.state : 0);
      if ((!found_port) ||
          (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) {
                (p_port != nullptr) ? "T" : "F",
                (p_port != nullptr) ? p_port->rfc.state : 0);
      if ((p_port == nullptr) || (p_port->rfc.state < RFC_STATE_OPENED)) {
        /* Port is not established yet. */
        *bd_addr = multiplexer_cb.bd_addr;
        log::info(