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

Commit 7ccf364a authored by Pomai Ahlo's avatar Pomai Ahlo Committed by Gerrit Code Review
Browse files

Merge "Log when p_cb or p_cb->p_cback is NULL" into main

parents 4b8957e4 ee7d775a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1387,8 +1387,14 @@ static void bta_jv_port_mgmt_cl_cback(uint32_t code, uint16_t port_handle) {
  uint16_t lcid;
  tBTA_JV_RFCOMM_CBACK* p_cback; /* the callback function */

  log::verbose("code={}, port_handle={}", code, port_handle);
  if (NULL == p_cb || NULL == p_cb->p_cback) return;
  if (p_cb == NULL) {
    log::warn("p_cb is NULL, code={}, port_handle={}", code, port_handle);
    return;
  } else if (p_cb->p_cback == NULL) {
    log::warn("p_cb->p_cback is null, code={}, port_handle={}", code,
              port_handle);
    return;
  }

  log::verbose("code={}, port_handle={}, handle={}", code, port_handle,
               p_cb->handle);