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

Commit 3772e2b9 authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

Logging cleanup: RFCOMM and GAP.

Change-Id: I83fda4f0805aaeb2ca060870449868879edcff78
parent 961932e5
Loading
Loading
Loading
Loading
+18 −2542

File changed.

Preview size limit exceeded, changes collapsed.

+5 −5
Original line number Diff line number Diff line
@@ -348,7 +348,7 @@ UINT16 GAP_SetPairableMode (UINT16 mode, BOOLEAN connect_only_paired)
    }
    else
    {
        GAP_TRACE_ERROR1 ("GAP_SetPairableMode: illegal mode %d", mode);
        GAP_TRACE_ERROR ("GAP_SetPairableMode: illegal mode %d", mode);
        status = GAP_ERR_ILL_MODE;
    }
    return (status);
@@ -604,13 +604,13 @@ UINT16 GAP_GetFirstInquiryResult(tGAP_INQ_RESULTS *p_results)
        memcpy(p_results, &gap_cb.cur_inqptr->results, sizeof(tBTM_INQ_RESULTS));

        ptr = (UINT8 *)gap_cb.cur_inqptr->results.remote_bd_addr;
        GAP_TRACE_EVENT6("GAP_GetFirstInqResult %02x%02x%02x%02x%02x%02x",
        GAP_TRACE_EVENT("GAP_GetFirstInqResult %02x%02x%02x%02x%02x%02x",
                    ptr[0],ptr[1],ptr[2],ptr[3],ptr[4],ptr[5]);
        return(BT_PASS);
    }
    else
    {
        GAP_TRACE_EVENT0("GAP_FirstInqResults:  No BD_ADDRs Found");
        GAP_TRACE_EVENT("GAP_FirstInqResults:  No BD_ADDRs Found");
        memset(p_results, 0, sizeof(tBTM_INQ_RESULTS));
        return(GAP_EOINQDB);
    }
@@ -643,14 +643,14 @@ UINT16 GAP_GetNextInquiryResult(tGAP_INQ_RESULTS *p_results)
                   sizeof(tGAP_INQ_RESULTS));

            ptr = (UINT8 *)gap_cb.cur_inqptr->results.remote_bd_addr;
            GAP_TRACE_EVENT6("GAP_GetNextInqResult %02x%02x%02x%02x%02x%02x",
            GAP_TRACE_EVENT("GAP_GetNextInqResult %02x%02x%02x%02x%02x%02x",
                        ptr[0],ptr[1],ptr[2],ptr[3],ptr[4],ptr[5]);

            return(BT_PASS);
        }
        else
        {
            GAP_TRACE_EVENT0("GAP_NextInqResults:  No BD_ADDRs Found");
            GAP_TRACE_EVENT("GAP_NextInqResults:  No BD_ADDRs Found");
            memset(p_results, 0, sizeof(tBTM_INQ_RESULTS));
            return(GAP_EOINQDB);
        }
+26 −26
Original line number Diff line number Diff line
@@ -197,7 +197,7 @@ UINT16 gap_get_conn_id_if_connected (BD_ADDR bd_addr)
    tGAP_CLCB       *p_clcb;
    UINT16          i;

    GAP_TRACE_EVENT2 ("gap_get_conn_id_if_connected() - BDA: %08x%04x ",
    GAP_TRACE_EVENT ("gap_get_conn_id_if_connected() - BDA: %08x%04x ",
                      (bd_addr[0]<<24)+(bd_addr[1]<<16)+(bd_addr[2]<<8)+bd_addr[3],
                      (bd_addr[4]<<8)+bd_addr[5]);

@@ -249,7 +249,7 @@ tGATT_STATUS gap_read_attr_value (UINT16 handle, tGATT_VALUE *p_value, BOOLEAN i
                        p_value->len -= offset;
                        p_dev_name += offset;
                        ARRAY_TO_STREAM(p, p_dev_name, p_value->len);
                        GAP_TRACE_EVENT1("GATT_UUID_GAP_DEVICE_NAME len=0x%04x", p_value->len);
                        GAP_TRACE_EVENT("GATT_UUID_GAP_DEVICE_NAME len=0x%04x", p_value->len);
                    }
                    break;

@@ -332,7 +332,7 @@ void gap_ble_s_attr_request_cback (UINT16 conn_id, UINT32 trans_id,
    tGATTS_RSP  rsp_msg;
    BOOLEAN     ignore = FALSE;

    GAP_TRACE_EVENT1("gap_ble_s_attr_request_cback : recv type (0x%02x)", type);
    GAP_TRACE_EVENT("gap_ble_s_attr_request_cback : recv type (0x%02x)", type);

    memset(&rsp_msg, 0, sizeof(tGATTS_RSP));

@@ -351,16 +351,16 @@ void gap_ble_s_attr_request_cback (UINT16 conn_id, UINT32 trans_id,

        case GATTS_REQ_TYPE_WRITE_EXEC:
            ignore = TRUE;
            GAP_TRACE_EVENT0("Ignore GATTS_REQ_TYPE_WRITE_EXEC"  );
            GAP_TRACE_EVENT("Ignore GATTS_REQ_TYPE_WRITE_EXEC"  );
            break;

        case GATTS_REQ_TYPE_MTU:
            GAP_TRACE_EVENT1("Get MTU exchange new mtu size: %d", p_data->mtu);
            GAP_TRACE_EVENT("Get MTU exchange new mtu size: %d", p_data->mtu);
            ignore = TRUE;
            break;

        default:
            GAP_TRACE_EVENT1("Unknown/unexpected LE GAP ATT request: 0x%02x", type);
            GAP_TRACE_EVENT("Unknown/unexpected LE GAP ATT request: 0x%02x", type);
            break;
    }

@@ -396,7 +396,7 @@ void gap_attr_db_init(void)
    /* Create a GAP service */
    service_handle = GATTS_CreateService (gap_cb.gatt_if, &uuid, 0, GAP_MAX_ATTR_NUM, TRUE);

    GAP_TRACE_EVENT1 ("gap_attr_db_init service_handle = %d", service_handle);
    GAP_TRACE_EVENT ("gap_attr_db_init service_handle = %d", service_handle);

    /* add Device Name Characteristic
    */
@@ -434,7 +434,7 @@ void gap_attr_db_init(void)

    status = GATTS_StartService(gap_cb.gatt_if, service_handle, GAP_TRANSPORT_SUPPORTED );

    GAP_TRACE_EVENT3 ("GAP App gatt_if: %d  s_hdl = %d start_status=%d",
    GAP_TRACE_EVENT ("GAP App gatt_if: %d  s_hdl = %d start_status=%d",
                      gap_cb.gatt_if, service_handle, status);


@@ -455,13 +455,13 @@ void GAP_BleAttrDBUpdate(UINT16 attr_uuid, tGAP_BLE_ATTR_VALUE *p_value)
    tGAP_ATTR  *p_db_attr = gap_cb.gatt_attr;
    UINT8       i = 0;

    GAP_TRACE_EVENT1("GAP_BleAttrDBUpdate attr_uuid=0x%04x", attr_uuid);
    GAP_TRACE_EVENT("GAP_BleAttrDBUpdate attr_uuid=0x%04x", attr_uuid);

    for (i = 0; i < GAP_MAX_CHAR_NUM; i ++, p_db_attr ++)
    {
        if (p_db_attr->uuid == attr_uuid)
        {
            GAP_TRACE_EVENT1("Found attr_uuid=0x%04x", attr_uuid);
            GAP_TRACE_EVENT("Found attr_uuid=0x%04x", attr_uuid);

            switch (attr_uuid)
            {
@@ -499,14 +499,14 @@ void gap_ble_cl_op_cmpl(tGAP_CLCB *p_clcb, BOOLEAN status, UINT16 len, UINT8 *p_
    tGAP_BLE_DEV_NAME_CBACK *p_dev_name_cback = (tGAP_BLE_DEV_NAME_CBACK *)(p_clcb->p_cback);
    UINT16                  op = p_clcb->cl_op_uuid;

    GAP_TRACE_EVENT1("gap_ble_cl_op_cmpl status: %d", status);
    GAP_TRACE_EVENT("gap_ble_cl_op_cmpl status: %d", status);

    p_clcb->cl_op_uuid = 0;
    p_clcb->p_cback=NULL;

    if (p_dev_name_cback)
    {
        GAP_TRACE_EVENT0("calling gap_ble_cl_op_cmpl");
        GAP_TRACE_EVENT("calling gap_ble_cl_op_cmpl");

        if (op == GATT_UUID_GAP_DEVICE_NAME)
            (* p_dev_name_cback)(status, p_clcb->bda, len, (char *)p_name);
@@ -535,7 +535,7 @@ static void gap_ble_c_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_
    UNUSED(gatt_if);
    UNUSED(transport);

    GAP_TRACE_EVENT5 ("gap_ble_c_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
    GAP_TRACE_EVENT ("gap_ble_c_connect_cback: from %08x%04x connected:%d conn_id=%d reason = 0x%04x",
                      (bda[0]<<24)+(bda[1]<<16)+(bda[2]<<8)+bda[3],
                      (bda[4]<<8)+bda[5], connected, conn_id, reason);

@@ -546,7 +546,7 @@ static void gap_ble_c_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_
        {
            if ((p_clcb = gap_clcb_alloc(conn_id, bda))== NULL)
            {
                GAP_TRACE_ERROR0 ("gap_ble_c_connect_cback: no_resource");
                GAP_TRACE_ERROR ("gap_ble_c_connect_cback: no_resource");
                return;
            }
        }
@@ -564,7 +564,7 @@ static void gap_ble_c_connect_cback (tGATT_IF gatt_if, BD_ADDR bda, UINT16 conn_
    {
        cl_op_uuid = p_clcb->cl_op_uuid;

        GAP_TRACE_EVENT1 ("cl_op_uuid=0x%04x", cl_op_uuid  );
        GAP_TRACE_EVENT ("cl_op_uuid=0x%04x", cl_op_uuid  );

        if (p_clcb->connected)
        {
@@ -611,7 +611,7 @@ static void gap_ble_c_cmpl_cback (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS

    op_type = p_clcb->cl_op_uuid;

    GAP_TRACE_EVENT3 ("gap_ble_c_cmpl_cback() - op_code: 0x%02x  status: 0x%02x  read_type: 0x%04x", op, status, op_type);
    GAP_TRACE_EVENT ("gap_ble_c_cmpl_cback() - op_code: 0x%02x  status: 0x%02x  read_type: 0x%04x", op, status, op_type);
    /* Currently we only issue read commands */
    if (op != GATTC_OPTYPE_READ)
        return;
@@ -627,7 +627,7 @@ static void gap_ble_c_cmpl_cback (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS
    switch (op_type)
    {
        case GATT_UUID_GAP_PREF_CONN_PARAM:
            GAP_TRACE_EVENT0 ("GATT_UUID_GAP_PREF_CONN_PARAM");
            GAP_TRACE_EVENT ("GATT_UUID_GAP_PREF_CONN_PARAM");
            /* Extract the peripheral preferred connection parameters and save them */

            STREAM_TO_UINT16 (min, pp);
@@ -641,7 +641,7 @@ static void gap_ble_c_cmpl_cback (UINT16 conn_id, tGATTC_OPTYPE op, tGATT_STATUS
            break;

        case GATT_UUID_GAP_DEVICE_NAME:
            GAP_TRACE_EVENT0 ("GATT_UUID_GAP_DEVICE_NAME");
            GAP_TRACE_EVENT ("GATT_UUID_GAP_DEVICE_NAME");
            len = (UINT16)strlen((char *)pp);
            if (len > GAP_CHAR_DEV_NAME_SIZE)
                len = GAP_CHAR_DEV_NAME_SIZE;
@@ -675,7 +675,7 @@ BOOLEAN gap_ble_cl_read_request(tGAP_CLCB *p_clcb, UINT16 uuid, void * p_cback)

    if (GATTC_Read(p_clcb->conn_id, GATT_READ_BY_TYPE, &param) != GATT_SUCCESS)
    {
        GAP_TRACE_ERROR0 ("GAP_BleReadPeerPrefConnParams: GATT_Read Failed");
        GAP_TRACE_ERROR ("GAP_BleReadPeerPrefConnParams: GATT_Read Failed");
        /* release the link here */
        GATT_Disconnect(p_clcb->conn_id);
        return(FALSE);
@@ -708,13 +708,13 @@ BOOLEAN GAP_BleReadPeerPrefConnParams (BD_ADDR peer_bda)
    {
        if ((p_clcb = gap_clcb_alloc(0, peer_bda)) == NULL)
        {
            GAP_TRACE_ERROR0("GAP_BleReadPeerPrefConnParams max connection reached");
            GAP_TRACE_ERROR("GAP_BleReadPeerPrefConnParams max connection reached");
            return FALSE;
        }
        p_clcb->connected = FALSE;
    }

    GAP_TRACE_API3 ("GAP_BleReadPeerPrefConnParams() - BDA: %08x%04x  cl_op_uuid: 0x%04x",
    GAP_TRACE_API ("GAP_BleReadPeerPrefConnParams() - BDA: %08x%04x  cl_op_uuid: 0x%04x",
                    (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
                    (peer_bda[4]<<8)+peer_bda[5], p_clcb->cl_op_uuid);

@@ -759,13 +759,13 @@ BOOLEAN GAP_BleReadPeerDevName (BD_ADDR peer_bda, tGAP_BLE_DEV_NAME_CBACK *p_cba
    {
        if ((p_clcb = gap_clcb_alloc(0, peer_bda)) == NULL)
        {
            GAP_TRACE_ERROR0("GAP_BleReadPeerDevName max connection reached");
            GAP_TRACE_ERROR("GAP_BleReadPeerDevName max connection reached");
            return FALSE;
        }
        p_clcb->connected = FALSE;
    }

    GAP_TRACE_EVENT3 ("GAP_BleReadPeerDevName() - BDA: %08x%04x  cl_op_uuid: 0x%04x",
    GAP_TRACE_EVENT ("GAP_BleReadPeerDevName() - BDA: %08x%04x  cl_op_uuid: 0x%04x",
                      (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
                      (peer_bda[4]<<8)+peer_bda[5], p_clcb->cl_op_uuid);

@@ -807,13 +807,13 @@ BOOLEAN GAP_BleCancelReadPeerDevName (BD_ADDR peer_bda)
{
    tGAP_CLCB *p_clcb = gap_find_clcb_by_bd_addr (peer_bda);

    GAP_TRACE_EVENT3 ("GAP_BleCancelReadPeerDevName() - BDA: %08x%04x  cl_op_uuid: 0x%04x",
    GAP_TRACE_EVENT ("GAP_BleCancelReadPeerDevName() - BDA: %08x%04x  cl_op_uuid: 0x%04x",
                      (peer_bda[0]<<24)+(peer_bda[1]<<16)+(peer_bda[2]<<8)+peer_bda[3],
                      (peer_bda[4]<<8)+peer_bda[5], (p_clcb == NULL)? 0 : p_clcb->cl_op_uuid);

    if (p_clcb == NULL || p_clcb->cl_op_uuid != GATT_UUID_GAP_DEVICE_NAME)
    {
        GAP_TRACE_ERROR0 ("Cannot cancel current op is not get dev name");
        GAP_TRACE_ERROR ("Cannot cancel current op is not get dev name");
        return FALSE;
    }

@@ -821,7 +821,7 @@ BOOLEAN GAP_BleCancelReadPeerDevName (BD_ADDR peer_bda)
    {
        if (!GATT_CancelConnect(gap_cb.gatt_if, peer_bda, TRUE))
        {
            GAP_TRACE_ERROR0 ("Cannot cancel where No connection id");
            GAP_TRACE_ERROR ("Cannot cancel where No connection id");
            return FALSE;
        }
    }
+21 −21
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
    UINT16       cid;
    tBT_UUID    bt_uuid = {2, {GAP_PROTOCOL_ID}};

    GAP_TRACE_EVENT0 ("GAP_CONN - Open Request");
    GAP_TRACE_EVENT ("GAP_CONN - Open Request");

    /* Allocate a new CCB. Return if none available. */
    if ((p_ccb = gap_allocate_ccb()) == NULL)
@@ -152,7 +152,7 @@ UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
    if (!p_ccb->rem_addr_specified && !is_server)
    {
        gap_release_ccb (p_ccb);
        GAP_TRACE_ERROR0 ("GAP ERROR: Client must specify a remote BD ADDR to connect to!");
        GAP_TRACE_ERROR ("GAP ERROR: Client must specify a remote BD ADDR to connect to!");
        return (GAP_INVALID_HANDLE);
    }

@@ -178,7 +178,7 @@ UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
    /* Register the PSM with L2CAP */
    if ((p_ccb->psm = L2CA_REGISTER (psm, &gap_cb.conn.reg_info, AMP_AUTOSWITCH_ALLOWED|AMP_USE_AMP_IF_POSSIBLE)) == 0)
    {
        GAP_TRACE_ERROR1 ("GAP_ConnOpen: Failure registering PSM 0x%04x", psm);
        GAP_TRACE_ERROR ("GAP_ConnOpen: Failure registering PSM 0x%04x", psm);
        gap_release_ccb (p_ccb);
        return (GAP_INVALID_HANDLE);
    }
@@ -187,7 +187,7 @@ UINT16 GAP_ConnOpen (char *p_serv_name, UINT8 service_id, BOOLEAN is_server,
    p_ccb->service_id = service_id;
    if (!BTM_SetSecurityLevel ((UINT8)!is_server, p_serv_name, p_ccb->service_id, security, p_ccb->psm, 0, 0))
    {
        GAP_TRACE_ERROR0 ("GAP_CONN - Security Error");
        GAP_TRACE_ERROR ("GAP_CONN - Security Error");
        gap_release_ccb (p_ccb);
        return (GAP_INVALID_HANDLE);
    }
@@ -254,7 +254,7 @@ UINT16 GAP_ConnClose (UINT16 gap_handle)
{
    tGAP_CCB    *p_ccb = gap_find_ccb_by_handle (gap_handle);

    GAP_TRACE_EVENT1 ("GAP_CONN - close  handle: 0x%x", gap_handle);
    GAP_TRACE_EVENT ("GAP_CONN - close  handle: 0x%x", gap_handle);

    if (p_ccb)
    {
@@ -337,7 +337,7 @@ UINT16 GAP_ConnReadData (UINT16 gap_handle, UINT8 *p_data, UINT16 max_len, UINT1

    GKI_enable();

    GAP_TRACE_EVENT2 ("GAP_ConnReadData - rx_queue_size left=%d, *p_len=%d",
    GAP_TRACE_EVENT ("GAP_ConnReadData - rx_queue_size left=%d, *p_len=%d",
                                       p_ccb->rx_queue_size, *p_len);

    return (BT_PASS);
@@ -374,7 +374,7 @@ int GAP_GetRxQueueCnt (UINT16 handle, UINT32 *p_rx_queue_count)
    else
        rc = GAP_INVALID_HANDLE;

    GAP_TRACE_EVENT2 ("GAP_GetRxQueueCnt - rc = 0x%04x, rx_queue_count=%d",
    GAP_TRACE_EVENT ("GAP_GetRxQueueCnt - rc = 0x%04x, rx_queue_count=%d",
                                       rc , *p_rx_queue_count);

    return (rc);
@@ -538,7 +538,7 @@ UINT16 GAP_ConnWriteData (UINT16 gap_handle, UINT8 *p_data, UINT16 max_len, UINT
        max_len -= p_buf->len;
        p_data  += p_buf->len;

        GAP_TRACE_EVENT1 ("GAP_WriteData %d bytes", p_buf->len);
        GAP_TRACE_EVENT ("GAP_WriteData %d bytes", p_buf->len);

        GKI_enqueue (&p_ccb->tx_queue, p_buf);
    }
@@ -652,18 +652,18 @@ UINT8 *GAP_ConnGetRemoteAddr (UINT16 gap_handle)
{
    tGAP_CCB    *p_ccb = gap_find_ccb_by_handle (gap_handle);

    GAP_TRACE_EVENT1 ("GAP_ConnGetRemoteAddr gap_handle = %d", gap_handle);
    GAP_TRACE_EVENT ("GAP_ConnGetRemoteAddr gap_handle = %d", gap_handle);

    if ((p_ccb) && (p_ccb->con_state > GAP_CCB_STATE_LISTENING))
    {
        GAP_TRACE_EVENT6("GAP_ConnGetRemoteAddr bda :0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n", \
        GAP_TRACE_EVENT("GAP_ConnGetRemoteAddr bda :0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n", \
                         p_ccb->rem_dev_address[0],p_ccb->rem_dev_address[1],p_ccb->rem_dev_address[2],
                         p_ccb->rem_dev_address[3],p_ccb->rem_dev_address[4],p_ccb->rem_dev_address[5]);
        return (p_ccb->rem_dev_address);
    }
    else
    {
        GAP_TRACE_EVENT0 ("GAP_ConnGetRemoteAddr return Error ");
        GAP_TRACE_EVENT ("GAP_ConnGetRemoteAddr return Error ");
        return (NULL);
    }
}
@@ -742,9 +742,9 @@ static void gap_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN

    if (xx == GAP_MAX_CONNECTIONS)
    {
        GAP_TRACE_WARNING0("*******");
        GAP_TRACE_WARNING0("WARNING: GAP Conn Indication for Unexpected Bd Addr...Disconnecting");
        GAP_TRACE_WARNING0("*******");
        GAP_TRACE_WARNING("*******");
        GAP_TRACE_WARNING("WARNING: GAP Conn Indication for Unexpected Bd Addr...Disconnecting");
        GAP_TRACE_WARNING("*******");

        /* Disconnect because it is an unexpected connection */
        L2CA_DISCONNECT_REQ (l2cap_cid);
@@ -761,7 +761,7 @@ static void gap_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
    /* Send response to the L2CAP layer. */
    L2CA_CONNECT_RSP (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_OK, L2CAP_CONN_OK, &p_ccb->ertm_info, &bt_uuid);

    GAP_TRACE_EVENT1("GAP_CONN - Rcvd L2CAP conn ind, CID: 0x%x", p_ccb->connection_id);
    GAP_TRACE_EVENT("GAP_CONN - Rcvd L2CAP conn ind, CID: 0x%x", p_ccb->connection_id);

    /* Send a Configuration Request. */
    L2CA_CONFIG_REQ (l2cap_cid, &p_ccb->cfg);
@@ -779,7 +779,7 @@ static void gap_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
*******************************************************************************/
static void gap_checks_con_flags (tGAP_CCB    *p_ccb)
{
    GAP_TRACE_EVENT1 ("gap_checks_con_flags conn_flags:0x%x, ", p_ccb->con_flags);
    GAP_TRACE_EVENT ("gap_checks_con_flags conn_flags:0x%x, ", p_ccb->con_flags);
    /* if all the required con_flags are set, report the OPEN event now */
    if ((p_ccb->con_flags & GAP_CCB_FLAGS_CONN_DONE) == GAP_CCB_FLAGS_CONN_DONE)
    {
@@ -805,7 +805,7 @@ static void gap_sec_check_complete (BD_ADDR bd_addr, tBT_TRANSPORT transport, vo
    UNUSED(bd_addr);
    UNUSED (transport);

    GAP_TRACE_EVENT3 ("gap_sec_check_complete conn_state:%d, conn_flags:0x%x, status:%d",
    GAP_TRACE_EVENT ("gap_sec_check_complete conn_state:%d, conn_flags:0x%x, status:%d",
        p_ccb->con_state, p_ccb->con_flags, res);
    if (p_ccb->con_state == GAP_CCB_STATE_IDLE)
        return;
@@ -969,7 +969,7 @@ static void gap_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
{
    tGAP_CCB    *p_ccb;

    GAP_TRACE_EVENT1 ("GAP_CONN - Rcvd L2CAP disc, CID: 0x%x", l2cap_cid);
    GAP_TRACE_EVENT ("GAP_CONN - Rcvd L2CAP disc, CID: 0x%x", l2cap_cid);

    /* Find CCB based on CID */
    if ((p_ccb = gap_find_ccb_by_cid (l2cap_cid)) == NULL)
@@ -1009,7 +1009,7 @@ static void gap_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)

        p_ccb->rx_queue_size += p_msg->len;
        /*
        GAP_TRACE_EVENT2 ("gap_data_ind - rx_queue_size=%d, msg len=%d",
        GAP_TRACE_EVENT ("gap_data_ind - rx_queue_size=%d, msg len=%d",
                                       p_ccb->rx_queue_size, p_msg->len);
         */

@@ -1037,7 +1037,7 @@ static void gap_congestion_ind (UINT16 lcid, BOOLEAN is_congested)
    BT_HDR      *p_buf;
    UINT8        status;

    GAP_TRACE_EVENT2 ("GAP_CONN - Rcvd L2CAP Is Congested (%d), CID: 0x%x",
    GAP_TRACE_EVENT ("GAP_CONN - Rcvd L2CAP Is Congested (%d), CID: 0x%x",
                      is_congested, lcid);

    /* Find CCB based on CID */
@@ -1219,7 +1219,7 @@ void gap_send_event (UINT16 gap_handle)
    }
    else
    {
        GAP_TRACE_ERROR0("Unable to allocate message buffer for event.");
        GAP_TRACE_ERROR("Unable to allocate message buffer for event.");
    }
}

+9 −9
Original line number Diff line number Diff line
@@ -58,18 +58,18 @@ static void btm_cback(UINT16 index, void *p_data)

            p_data = &inq_cmpl;

            GAP_TRACE_EVENT2("   GAP Inquiry Complete Event (Status 0x%04x, Result(s) %d)",
            GAP_TRACE_EVENT("   GAP Inquiry Complete Event (Status 0x%04x, Result(s) %d)",
                            inq_cmpl.status, inq_cmpl.num_results);
            break;

        case GAP_EVT_DISCOVERY_COMPLETE:
            if (*((UINT16 *) p_data))
            {
                GAP_TRACE_EVENT1("   GAP Discovery Complete Event(SDP Result: 0x%04x)", *((UINT16 *) p_data));
                GAP_TRACE_EVENT("   GAP Discovery Complete Event(SDP Result: 0x%04x)", *((UINT16 *) p_data));
            }
            else
            {
                GAP_TRACE_EVENT0("   GAP Discovery Successfully Completed");
                GAP_TRACE_EVENT("   GAP Discovery Successfully Completed");
            }

            break;
@@ -79,7 +79,7 @@ static void btm_cback(UINT16 index, void *p_data)
            ((tGAP_REMOTE_DEV_NAME *)p_data)->status =
                    gap_convert_btm_status ((tBTM_STATUS)((tBTM_REMOTE_DEV_NAME *)p_data)->status);

            GAP_TRACE_EVENT1("   GAP Remote Name Complete Event (status 0x%04x)", ((tGAP_REMOTE_DEV_NAME *)p_data)->status);
            GAP_TRACE_EVENT("   GAP Remote Name Complete Event (status 0x%04x)", ((tGAP_REMOTE_DEV_NAME *)p_data)->status);

            break;
        };
@@ -119,11 +119,11 @@ void gap_inq_results_cb(tBTM_INQ_RESULTS *p_results, UINT8 *p_eir)
    UINT8        index;
    UNUSED(p_eir);

    GAP_TRACE_EVENT6 ("GAP Inquiry Results Callback (bdaddr [%02x%02x%02x%02x%02x%02x])",
    GAP_TRACE_EVENT ("GAP Inquiry Results Callback (bdaddr [%02x%02x%02x%02x%02x%02x])",
                p_results->remote_bd_addr[0], p_results->remote_bd_addr[1],
                p_results->remote_bd_addr[2], p_results->remote_bd_addr[3],
                p_results->remote_bd_addr[4], p_results->remote_bd_addr[5]);
    GAP_TRACE_EVENT4 ("                             (COD [%02x%02x%02x], clkoff 0x%04x)",
    GAP_TRACE_EVENT ("                             (COD [%02x%02x%02x], clkoff 0x%04x)",
                p_results->dev_class[0], p_results->dev_class[1], p_results->dev_class[2],
                p_results->clock_offset);

@@ -167,7 +167,7 @@ void gap_find_addr_name_cb (tBTM_REMOTE_DEV_NAME *p)
    {
        if (p->status == BTM_SUCCESS)
        {
            GAP_TRACE_EVENT2("   GAP: FindAddrByName Rem Name Cmpl Evt (Status 0x%04x, Name [%s])",
            GAP_TRACE_EVENT("   GAP: FindAddrByName Rem Name Cmpl Evt (Status 0x%04x, Name [%s])",
                                p->status, p->remote_bd_name);

            /* See if the returned name matches the desired name; if not initiate another search */
@@ -194,7 +194,7 @@ void gap_find_addr_name_cb (tBTM_REMOTE_DEV_NAME *p)
        }
        else
        {
            GAP_TRACE_EVENT1("   GAP: FindAddrByName Rem Name Cmpl Evt (Status 0x%04x)", p->status);
            GAP_TRACE_EVENT("   GAP: FindAddrByName Rem Name Cmpl Evt (Status 0x%04x)", p->status);
            p_result->status = gap_convert_btm_status ((tBTM_STATUS) p->status);
        }

@@ -232,7 +232,7 @@ void gap_find_addr_inq_cb (tBTM_INQUIRY_CMPL *p)
    if (p_cb->in_use)
    {

        GAP_TRACE_EVENT2("   GAP: FindAddrByName Inq Cmpl Evt (Status 0x%04x, Result(s) %d)",
        GAP_TRACE_EVENT("   GAP: FindAddrByName Inq Cmpl Evt (Status 0x%04x, Result(s) %d)",
            p->status, p->num_resp);

        if (p->status == BTM_SUCCESS)
Loading