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

Commit 839d3502 authored by Chris Manton's avatar Chris Manton
Browse files

Re-log btif/src/btif_sock_rfc::btsock_rfc_listen

Towards loggable code

Bug: 163134718
Tag: #refactor
Test: act.py -tc BleCocTest
Test: ble paired 2 phones
Change-Id: Ie7839827710efa59e6181fd34cc7d1e4a3aad3cd
parent aeffd86f
Loading
Loading
Loading
Loading
+3 −7
Original line number Diff line number Diff line
@@ -285,10 +285,6 @@ bt_status_t btsock_rfc_listen(const char* service_name,

  if ((flags & BTSOCK_FLAG_NO_SDP) == 0) {
    if (!service_uuid || service_uuid->IsEmpty()) {
      APPL_TRACE_DEBUG(
          "%s: service_uuid not set AND BTSOCK_FLAG_NO_SDP is not set - "
          "changing to SPP",
          __func__);
      // Use serial port profile to listen to specified channel
      service_uuid = &UUID_SPP;
    } else {
@@ -305,10 +301,10 @@ bt_status_t btsock_rfc_listen(const char* service_name,
  rfc_slot_t* slot =
      alloc_rfc_slot(NULL, service_name, *service_uuid, channel, flags, true);
  if (!slot) {
    LOG_ERROR("%s unable to allocate RFCOMM slot.", __func__);
    LOG_ERROR("unable to allocate RFCOMM slot");
    return BT_STATUS_FAIL;
  }
  APPL_TRACE_DEBUG("BTA_JvGetChannelId: service_name: %s - channel: %d",
  LOG_DEBUG("Adding listening socket service_name: %s - channel: %d",
            service_name, channel);
  BTA_JvGetChannelId(BTA_JV_CONN_TYPE_RFCOMM, slot->id, channel);
  *sock_fd = slot->app_fd;  // Transfer ownership of fd to caller.