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

Commit 9cc815b0 authored by Pomai Ahlo's avatar Pomai Ahlo
Browse files

RFCOMM: convert VLOG to GD style

Bug: 295023364
Test: m Bluetooth
Flag: EXEMPT changes only affect logs
Change-Id: I8525ad5597942645aa2092cd2478ff6b992325a8
parent 21057df7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -330,7 +330,7 @@ int RFCOMM_RemoveServer(uint16_t handle) {
  p_port->p_mgmt_callback = nullptr;

  if (!p_port->in_use || (p_port->state == PORT_CONNECTION_STATE_CLOSED)) {
    VLOG(1) << __func__ << ": handle " << handle << " not opened";
    LOG_DEBUG("handle %u not opened", handle);
    return (PORT_SUCCESS);
  }
  LOG(INFO) << __func__ << ": handle=" << handle;
+4 −6
Original line number Diff line number Diff line
@@ -427,10 +427,8 @@ void PORT_ParNegCnf(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu, uint8_t cl,
void PORT_DlcEstablishInd(tRFC_MCB* p_mcb, uint8_t dlci, uint16_t mtu) {
  tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci);

  LOG_VERBOSE("PORT_DlcEstablishInd p_mcb:%p, dlci:%d mtu:%di, p_port:%p",
              p_mcb, dlci, mtu, p_port);
  VLOG(1) << __func__
          << " p_mcb addr:" << ADDRESS_TO_LOGGABLE_STR(p_mcb->bd_addr);
  LOG_VERBOSE("p_mcb:%p, dlci:%d mtu:%di, p_port:%p, bd_addr:%s", p_mcb, dlci,
              mtu, p_port, ADDRESS_TO_LOGGABLE_CSTR(p_mcb->bd_addr));

  if (!p_port) {
    /* This can be a first request for this port */
@@ -710,8 +708,8 @@ void PORT_LineStatusInd(tRFC_MCB* p_mcb, uint8_t dlci, uint8_t line_status) {
 *
 ******************************************************************************/
void PORT_DlcReleaseInd(tRFC_MCB* p_mcb, uint8_t dlci) {
  VLOG(1) << __func__ << ": dlci=" << std::to_string(dlci)
          << ", bd_addr=" << p_mcb->bd_addr;
  LOG_VERBOSE("dlci:%u, bd_addr:%s", dlci,
              ADDRESS_TO_LOGGABLE_CSTR(p_mcb->bd_addr));
  tPORT* p_port = port_find_mcb_dlci_port(p_mcb, dlci);
  if (!p_port) return;
  port_rfc_closed(p_port, PORT_CLOSED);
+4 −5
Original line number Diff line number Diff line
@@ -287,14 +287,13 @@ tRFC_MCB* port_find_mcb(const RawAddress& bd_addr) {
  for (tRFC_MCB& mcb : rfc_cb.port.rfc_mcb) {
    if ((mcb.state != RFC_MX_STATE_IDLE) && (mcb.bd_addr == bd_addr)) {
      /* Multiplexer channel found do not change anything */
      VLOG(1) << __func__
              << ": found bd_addr=" << ADDRESS_TO_LOGGABLE_STR(bd_addr)
              << ", rfc_mcb=" << &mcb << ", lcid=" << loghex(mcb.lcid);
      LOG_VERBOSE("found, bd_addr:%s, rfc_mcb:%p, lcid:%s",
                  ADDRESS_TO_LOGGABLE_CSTR(bd_addr), &mcb,
                  loghex(mcb.lcid).c_str());
      return &mcb;
    }
  }
  VLOG(1) << __func__
          << ": not found, bd_addr:" << ADDRESS_TO_LOGGABLE_STR(bd_addr);
  LOG_WARN("not found, bd_addr:%s", ADDRESS_TO_LOGGABLE_CSTR(bd_addr));
  return nullptr;
}

+2 −2
Original line number Diff line number Diff line
@@ -234,8 +234,8 @@ void RFCOMM_ConfigCnf(uint16_t lcid, UNUSED_ATTR uint16_t initiator,
 *
 ******************************************************************************/
void RFCOMM_DisconnectInd(uint16_t lcid, bool is_conf_needed) {
  VLOG(1) << __func__ << ": lcid=" << loghex(lcid)
          << ", is_conf_needed=" << is_conf_needed;
  LOG_VERBOSE("lcid:%s, is_conf_needed:%d", loghex(lcid).c_str(),
              is_conf_needed);
  tRFC_MCB* p_mcb = rfc_find_lcid_mcb(lcid);
  if (!p_mcb) {
    LOG(WARNING) << __func__ << ": no mcb for lcid " << loghex(lcid);
+3 −3
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static void rfc_mx_conf_cnf(tRFC_MCB* p_mcb, uint16_t result);
 *
 * Function         rfc_mx_sm_execute
 *
 * Description      This function sends multiplexor events through the state
 * Description      This function sends multiplexer events through the state
 *                  machine.
 *
 * Returns          void
@@ -75,8 +75,8 @@ void rfc_mx_sm_execute(tRFC_MCB* p_mcb, tRFC_MX_EVENT event, void* p_data) {
  CHECK(p_mcb != nullptr) << __func__ << ": NULL mcb for event " << event;

  LOG_INFO(
      "RFCOMM peer:%s event:%d state:%s", ADDRESS_TO_LOGGABLE_CSTR(p_mcb->bd_addr),
      event,
      "RFCOMM peer:%s event:%d state:%s",
      ADDRESS_TO_LOGGABLE_CSTR(p_mcb->bd_addr), event,
      rfcomm_mx_state_text(static_cast<tRFC_MX_STATE>(p_mcb->state)).c_str());

  switch (p_mcb->state) {
Loading