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

Commit 23a2901c authored by Bidhya Sharma's avatar Bidhya Sharma Committed by Automerger Merge Worker
Browse files

Merge "RFComm: Adds debug log in PORT_IsOpening" am: 3cc3c2ab am: 04fec50d

parents 65e7349f 04fec50d
Loading
Loading
Loading
Loading
+8 −1
Original line number Original line Diff line number Diff line
@@ -498,6 +498,8 @@ bool PORT_IsOpening(RawAddress* bd_addr) {
    if ((multiplexer_cb.state > RFC_MX_STATE_IDLE) &&
    if ((multiplexer_cb.state > RFC_MX_STATE_IDLE) &&
        (multiplexer_cb.state < RFC_MX_STATE_CONNECTED)) {
        (multiplexer_cb.state < RFC_MX_STATE_CONNECTED)) {
      *bd_addr = multiplexer_cb.bd_addr;
      *bd_addr = multiplexer_cb.bd_addr;
      LOG_DEBUG(
          "Found a rfc_mcb in the middle of opening a port, returning true");
      return true;
      return true;
    }
    }


@@ -513,15 +515,20 @@ bool PORT_IsOpening(RawAddress* bd_addr) {
        }
        }
      }
      }


      LOG_DEBUG("RFC_MX_STATE_CONNECTED, found_port=%d, tRFC_PORT_STATE=%d",
                found_port, p_port->rfc.state);
      if ((!found_port) ||
      if ((!found_port) ||
          (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) {
          (found_port && (p_port->rfc.state < RFC_STATE_OPENED))) {
        /* Port is not established yet. */
        /* Port is not established yet. */
        *bd_addr = multiplexer_cb.bd_addr;
        *bd_addr = multiplexer_cb.bd_addr;
        LOG_DEBUG(
            "In RFC_MX_STATE_CONNECTED but port is not established yet, "
            "returning true");
        return true;
        return true;
      }
      }
    }
    }
  }
  }

  LOG_DEBUG("false");
  return false;
  return false;
}
}