diff options
61 files changed, 206 insertions, 182 deletions
diff --git a/audio_a2dp_hw/audio_a2dp_hw.c b/audio_a2dp_hw/audio_a2dp_hw.c index 632b1da02..5b194b412 100644 --- a/audio_a2dp_hw/audio_a2dp_hw.c +++ b/audio_a2dp_hw/audio_a2dp_hw.c @@ -46,7 +46,7 @@ #include "audio_a2dp_hw.h" #include "bt_utils.h" -#define LOG_TAG "audio_a2dp_hw" +#define LOG_TAG "bt_a2dp_hw" #include "osi/include/log.h" /***************************************************************************** diff --git a/bta/av/bta_av_act.c b/bta/av/bta_av_act.c index 9d14d2519..89e6fd867 100644 --- a/bta/av/bta_av_act.c +++ b/bta/av/bta_av_act.c @@ -37,6 +37,9 @@ #include "bta_ar_api.h" #endif +#define LOG_TAG "bt_bta_av" +#include "osi/include/log.h" + /***************************************************************************** ** Constants *****************************************************************************/ @@ -500,7 +503,7 @@ void bta_av_rc_opened(tBTA_AV_CB *p_cb, tBTA_AV_DATA *p_data) p_scb->rc_handle = p_data->rc_conn_chg.handle; APPL_TRACE_DEBUG("bta_av_rc_opened shdl:%d, srch %d", i + 1, p_scb->rc_handle); shdl = i+1; - APPL_TRACE_ERROR("use_rc:%d", p_scb->use_rc); + LOG_INFO("%s allow incoming AVRCP connections:%d", __func__, p_scb->use_rc); bta_sys_stop_timer(&p_scb->timer); disc = p_scb->hndl; break; diff --git a/bta/dm/bta_dm_act.c b/bta/dm/bta_dm_act.c index c39ec3cc8..55beafc82 100644 --- a/bta/dm/bta_dm_act.c +++ b/bta/dm/bta_dm_act.c @@ -39,6 +39,9 @@ #include "gap_api.h" /* For GAP_BleReadPeerPrefConnParams */ #include <string.h> +#define LOG_TAG "bt_bta_dm" +#include "osi/include/log.h" + #if (GAP_INCLUDED == TRUE) #include "gap_api.h" #endif @@ -1133,7 +1136,7 @@ void bta_dm_discover (tBTA_DM_MSG *p_data) #if BLE_INCLUDED == TRUE && BTA_GATT_INCLUDED == TRUE UINT16 len = (UINT16)(sizeof(tBT_UUID) * p_data->discover.num_uuid); #endif - APPL_TRACE_EVENT("bta_dm_discover services_to_search=0x%04X, sdp_search=%d", + APPL_TRACE_EVENT("%s services_to_search=0x%04X, sdp_search=%d", __func__, p_data->discover.services, p_data->discover.sdp_search); /* save the search condition */ @@ -2023,7 +2026,7 @@ static void bta_dm_find_services ( BD_ADDR bd_addr) /* try to search all services by search based on L2CAP UUID */ if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK ) { - APPL_TRACE_ERROR("services_to_search = %08x",bta_dm_search_cb.services_to_search); + LOG_INFO("%s services_to_search=%08x", __func__, bta_dm_search_cb.services_to_search); if (bta_dm_search_cb.services_to_search & BTA_RES_SERVICE_MASK) { uuid.uu.uuid16 = bta_service_id_to_uuid_lkup_tbl[0]; @@ -2070,26 +2073,16 @@ static void bta_dm_find_services ( BD_ADDR bd_addr) } if (uuid.len == 0) - uuid.len = LEN_UUID_16; - -#if 0 - if (uuid.uu.uuid16 == UUID_SERVCLASS_PNP_INFORMATION) - { - num_attrs = 2; - } -#endif + uuid.len = LEN_UUID_16; if (bta_dm_search_cb.service_index == BTA_USER_SERVICE_ID) { memcpy(&uuid, &bta_dm_search_cb.uuid, sizeof(tSDP_UUID)); } - - APPL_TRACE_ERROR("****************search UUID = %04x***********", uuid.uu.uuid16); - //SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, num_attrs, attr_list); + LOG_INFO("%s search UUID = %04x", __func__, uuid.uu.uuid16); SDP_InitDiscoveryDb (bta_dm_search_cb.p_sdp_db, BTA_DM_SDP_DB_SIZE, 1, &uuid, 0, NULL); - memset(g_disc_raw_data_buf, 0, sizeof(g_disc_raw_data_buf)); bta_dm_search_cb.p_sdp_db->raw_data = g_disc_raw_data_buf; @@ -5349,7 +5342,7 @@ static void bta_dm_gatt_disc_result(tBTA_GATT_ID service_id) APPL_TRACE_ERROR("%s out of room to accomodate more service ids ble_raw_size = %d ble_raw_used = %d", __FUNCTION__,bta_dm_search_cb.ble_raw_size, bta_dm_search_cb.ble_raw_used ); } - APPL_TRACE_ERROR("bta_dm_gatt_disc_result serivce_id len=%d ", service_id.uuid.len); + LOG_INFO("%s service_id_uuid_len=%d ", __func__, service_id.uuid.len); if ( bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE) { diff --git a/bta/gatt/bta_gattc_act.c b/bta/gatt/bta_gattc_act.c index 0731c7aa5..38d05a4cc 100755 --- a/bta/gatt/bta_gattc_act.c +++ b/bta/gatt/bta_gattc_act.c @@ -22,7 +22,7 @@ * machine. * ******************************************************************************/ -#define LOG_TAG "bta_gattc_act" +#define LOG_TAG "bt_bta_gattc" #include "bt_target.h" @@ -565,8 +565,11 @@ void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg /* always call open to hold a connection */ if (!GATT_Connect(p_data->client_if, p_data->remote_bda, FALSE, p_data->transport)) { + uint8_t *bda = (uint8_t *)p_data->remote_bda; status = BTA_GATT_ERROR; - APPL_TRACE_ERROR("bta_gattc_init_bk_conn failed"); + APPL_TRACE_ERROR("%s unable to connect to remote bd_addr:%02x:%02x:%02x:%02x:%02x:%02x", + __func__, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); + } else { diff --git a/bta/gatt/bta_gattc_api.c b/bta/gatt/bta_gattc_api.c index a91b20ec6..36e7b7d1a 100644 --- a/bta/gatt/bta_gattc_api.c +++ b/bta/gatt/bta_gattc_api.c @@ -976,7 +976,7 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if, if (!p_char_id) { - APPL_TRACE_ERROR("deregistration failed, unknow char id"); + APPL_TRACE_ERROR("%s deregistration failed, unknown char id", __func__); return status; } @@ -988,7 +988,8 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if, !memcmp(p_clreg->notif_reg[i].remote_bda, bda, BD_ADDR_LEN) && bta_gattc_charid_compare(&p_clreg->notif_reg[i].char_id, p_char_id)) { - APPL_TRACE_DEBUG("Deregistered."); + APPL_TRACE_DEBUG("%s deregistered bd_addr:%02x:%02x:%02x:%02x:%02x:%02x", + __func__, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); memset(&p_clreg->notif_reg[i], 0, sizeof(tBTA_GATTC_NOTIF_REG)); status = BTA_GATT_OK; break; @@ -997,13 +998,14 @@ tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if, if (i == BTA_GATTC_NOTIF_REG_MAX) { status = BTA_GATT_ERROR; - - APPL_TRACE_ERROR("registration not found"); + APPL_TRACE_ERROR("%s registration not found bd_addr:%02x:%02x:%02x:%02x:%02x:%02x", + __func__, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); } } else { - APPL_TRACE_ERROR("Client_if: %d Not Registered", client_if); + APPL_TRACE_ERROR("%s client_if: %d not registered bd_addr:%02x:%02x:%02x:%02x:%02x:%02x", + __func__, client_if, bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); } return status; diff --git a/bta/gatt/bta_gattc_cache.c b/bta/gatt/bta_gattc_cache.c index faf1596c9..0f41f7f43 100644 --- a/bta/gatt/bta_gattc_cache.c +++ b/bta/gatt/bta_gattc_cache.c @@ -37,6 +37,9 @@ #include "btm_api.h" #include "btm_ble_api.h" +#define LOG_TAG "bt_bta_gattc" +#include "osi/include/log.h" + static void bta_gattc_char_dscpt_disc_cmpl(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb); static tBTA_GATT_STATUS bta_gattc_sdp_service_disc(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb); @@ -598,7 +601,7 @@ static void bta_gattc_explore_srvc(UINT16 conn_id, tBTA_GATTC_SERV *p_srvc_cb) } } /* no service found at all, the end of server discovery*/ - APPL_TRACE_ERROR("No More Service found"); + LOG_WARN("%s no more services found", __func__); #if (defined BTA_GATT_DEBUG && BTA_GATT_DEBUG == TRUE) bta_gattc_display_cache_server(p_srvc_cb->p_srvc_cache); diff --git a/bta/gatt/bta_gattc_utils.c b/bta/gatt/bta_gattc_utils.c index 64b1f0df9..946d8bf29 100644 --- a/bta/gatt/bta_gattc_utils.c +++ b/bta/gatt/bta_gattc_utils.c @@ -33,6 +33,7 @@ #include "bta_gattc_int.h" #include "l2c_api.h" +#define LOG_TAG "bt_bta_gattc" /***************************************************************************** ** Constants *****************************************************************************/ @@ -709,7 +710,10 @@ BOOLEAN bta_gattc_mark_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR_PTR remote_bda } if (!add) { - APPL_TRACE_ERROR("Do not find the bg connection mask for the remote device"); + uint8_t *bda = (uint8_t *)remote_bda_ptr; + APPL_TRACE_ERROR("%s unable to find the bg connection mask for" + " bd_addr:%02x:%02x:%02x:%02x:%02x:%02x", __func__, + bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); return FALSE; } else /* adding a new device mask */ diff --git a/bta/hh/bta_hh_api.c b/bta/hh/bta_hh_api.c index 58090f6e2..1fdbc2928 100644 --- a/bta/hh/bta_hh_api.c +++ b/bta/hh/bta_hh_api.c @@ -35,6 +35,9 @@ #include "l2c_api.h" #include "utl.h" +#define LOG_TAG "bt_bta_hh" +#include "osi/include/log.h" + /***************************************************************************** ** Constants *****************************************************************************/ @@ -65,7 +68,7 @@ void BTA_HhEnable(tBTA_SEC sec_mask, tBTA_HH_CBACK *p_cback) /* register with BTA system manager */ bta_sys_register(BTA_ID_HH, &bta_hh_reg); - APPL_TRACE_ERROR("Calling BTA_HhEnable"); + LOG_INFO("%s sec_mask:0x%x p_cback:%p", __func__, sec_mask, p_cback); p_buf = (tBTA_HH_API_ENABLE *)GKI_getbuf((UINT16)sizeof(tBTA_HH_API_ENABLE)); if (p_buf != NULL) diff --git a/bta/hh/bta_hh_le.c b/bta/hh/bta_hh_le.c index 7cbf09c02..4f4feec96 100644 --- a/bta/hh/bta_hh_le.c +++ b/bta/hh/bta_hh_le.c @@ -31,6 +31,9 @@ #include "btm_int.h" #include "utl.h" +#define LOG_TAG "bt_bta_hh" +#include "osi/include/log.h" + #ifndef BTA_HH_LE_RECONN #define BTA_HH_LE_RECONN TRUE #endif @@ -594,7 +597,7 @@ tBTA_HH_LE_RPT * bta_hh_le_find_alloc_report_entry(tBTA_HH_DEV_CB *p_cb, ** ** Function bta_hh_le_read_char_dscrpt ** -** Description read cahracteristic descriptor +** Description read characteristic descriptor ** *******************************************************************************/ tBTA_HH_STATUS bta_hh_le_read_char_dscrpt(tBTA_HH_DEV_CB *p_cb, UINT16 srvc_uuid, UINT8 srvc_inst_id, @@ -626,8 +629,8 @@ tBTA_HH_STATUS bta_hh_le_read_char_dscrpt(tBTA_HH_DEV_CB *p_cb, UINT16 srvc_uuid else { #if BTA_HH_DEBUG == TRUE - APPL_TRACE_ERROR("bta_hh_le_read_char_dscrpt: No such descrpt exists: %s(0x%04x)", - bta_hh_uuid_to_str(char_descp_uuid), char_descp_uuid); + LOG_WARN("%s No descriptor exists: %s(0x%04x)", __func__, + bta_hh_uuid_to_str(char_descp_uuid), char_descp_uuid); #endif } return status; @@ -1139,7 +1142,7 @@ void bta_hh_le_expl_rpt(tBTA_HH_DEV_CB *p_dev_cb, } while (1); - APPL_TRACE_ERROR("all report searched"); + LOG_INFO("%s all BLE reports searched", __func__); bta_hh_le_read_rpt_ref_descr(p_dev_cb, &p_dev_cb->hid_srvc[p_dev_cb->cur_srvc_index].report[0]); @@ -2667,7 +2670,8 @@ void bta_hh_le_write_dev_act(tBTA_HH_DEV_CB *p_cb, tBTA_HH_DATA *p_data) break; default: - APPL_TRACE_ERROR("unsupported trsanction for LE HID device: %d", p_data->api_sndcmd.t_type); + APPL_TRACE_ERROR("%s unsupported transaction for BLE HID device: %d", + __func__, p_data->api_sndcmd.t_type); break; } } diff --git a/bta/sys/bta_sys_main.c b/bta/sys/bta_sys_main.c index 47997233f..b03c2d115 100644 --- a/bta/sys/bta_sys_main.c +++ b/bta/sys/bta_sys_main.c @@ -21,7 +21,7 @@ * This is the main implementation file for the BTA system manager. * ******************************************************************************/ -#define LOG_TAG "bta_sys_main" +#define LOG_TAG "bt_bta_sys_main" #include <assert.h> #include <string.h> @@ -652,7 +652,7 @@ void bta_sys_stop_timer(TIMER_LIST_ENT *p_tle) { alarm_t *alarm = hash_map_get(bta_alarm_hash_map, p_tle); if (alarm == NULL) { - LOG_ERROR("%s expected alarm was not in bta alarm hash map.", __func__); + LOG_DEBUG("%s expected alarm was not in bta alarm hash map.", __func__); return; } alarm_cancel(alarm); diff --git a/btcore/src/counter.c b/btcore/src/counter.c index 0570ec349..08aa518ae 100644 --- a/btcore/src/counter.c +++ b/btcore/src/counter.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "bt_counter" +#define LOG_TAG "bt_core_counter" #include <assert.h> #include <errno.h> diff --git a/btcore/src/module.c b/btcore/src/module.c index b4b4e78eb..5f3902ead 100644 --- a/btcore/src/module.c +++ b/btcore/src/module.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "bt_module" +#define LOG_TAG "bt_core_module" #include <assert.h> #include <dlfcn.h> diff --git a/btif/co/bta_ag_co.c b/btif/co/bta_ag_co.c index 2092d5865..502813fe9 100755 --- a/btif/co/bta_ag_co.c +++ b/btif/co/bta_ag_co.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "BTA_AG_CO" +#define LOG_TAG "bt_btif_bta_ag" #include "gki.h" #include "bta_api.h" diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c index c6f550cd9..18d03390b 100644 --- a/btif/src/bluetooth.c +++ b/btif/src/bluetooth.c @@ -41,7 +41,7 @@ #include <hardware/bt_rc.h> #define LOG_NDDEBUG 0 -#define LOG_TAG "bluedroid" +#define LOG_TAG "bt_bluedroid" #include "btif_api.h" #include "btsnoop.h" diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index ba83f0a84..28d0d9a79 100644 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -29,7 +29,7 @@ #include <system/audio.h> #include "hardware/bt_av.h" -#define LOG_TAG "BTIF_AV" +#define LOG_TAG "bt_btif_av" #include "btif_av.h" #include "btif_util.h" diff --git a/btif/src/btif_core.c b/btif/src/btif_core.c index 4894000c6..3dd5b2b32 100644 --- a/btif/src/btif_core.c +++ b/btif/src/btif_core.c @@ -36,8 +36,10 @@ #include <sys/stat.h> #include <sys/types.h> -#define LOG_TAG "BTIF_CORE" +#define LOG_TAG "bt_btif_core" #include "btcore/include/bdaddr.h" + +#include "bdaddr.h" #include "bt_utils.h" #include "bta_api.h" #include "bte.h" diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 3dd7d3ec9..399410bf5 100644 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -25,7 +25,7 @@ * ***********************************************************************************/ -#define LOG_TAG "btif_dm" +#define LOG_TAG "bt_btif_dm" #include <stdio.h> #include <stdlib.h> @@ -47,6 +47,7 @@ #include "bta_gatt_api.h" #include "include/stack_config.h" + #include "osi/include/log.h" /****************************************************************************** @@ -373,7 +374,7 @@ BOOLEAN check_cod(const bt_bdaddr_t *remote_bdaddr, uint32_t cod) sizeof(uint32_t), &remote_cod); if (btif_storage_get_remote_device_property((bt_bdaddr_t *)remote_bdaddr, &prop_name) == BT_STATUS_SUCCESS) { - BTIF_TRACE_ERROR("%s: remote_cod = 0x%06x", __FUNCTION__, remote_cod); + LOG_INFO("%s remote_cod = 0x%08x cod = 0x%08x", __func__, remote_cod, cod); if ((remote_cod & 0x7ff) == cod) return TRUE; } @@ -559,16 +560,16 @@ static void btif_update_remote_properties(BD_ADDR bd_addr, BD_NAME bd_name, /* class of device */ cod = devclass2uint(dev_class); - BTIF_TRACE_DEBUG("%s():cod is 0x%06x", __FUNCTION__, cod); + BTIF_TRACE_DEBUG("%s cod is 0x%06x", __func__, cod); if ( cod == 0) { /* Try to retrieve cod from storage */ - BTIF_TRACE_DEBUG("%s():cod is 0, checking cod from storage", __FUNCTION__); + BTIF_TRACE_DEBUG("%s cod is 0, checking cod from storage", __func__); BTIF_STORAGE_FILL_PROPERTY(&properties[num_properties], BT_PROPERTY_CLASS_OF_DEVICE, sizeof(cod), &cod); status = btif_storage_get_remote_device_property(&bdaddr, &properties[num_properties]); - BTIF_TRACE_DEBUG("%s():cod retreived from storage is 0x%06x", __FUNCTION__, cod); + BTIF_TRACE_DEBUG("%s cod retrieved from storage is 0x%06x", __func__, cod); if ( cod == 0) { - BTIF_TRACE_DEBUG("%s():cod is again 0, set as unclassified", __FUNCTION__); + BTIF_TRACE_DEBUG("%s cod is again 0, set as unclassified", __func__); cod = COD_UNCLASSIFIED; } } @@ -848,8 +849,8 @@ static void btif_dm_pin_req_evt(tBTA_DM_PIN_REQ *p_pin_req) cod = devclass2uint(p_pin_req->dev_class); - if ( cod == 0) { - BTIF_TRACE_DEBUG("%s():cod is 0, set as unclassified", __FUNCTION__); + if (cod == 0) { + BTIF_TRACE_DEBUG("%s cod is 0, set as unclassified", __func__); cod = COD_UNCLASSIFIED; } @@ -968,8 +969,8 @@ static void btif_dm_ssp_cfm_req_evt(tBTA_DM_SP_CFM_REQ *p_ssp_cfm_req) cod = devclass2uint(p_ssp_cfm_req->dev_class); - if ( cod == 0) { - LOG_DEBUG("cod is 0, set as unclassified"); + if (cod == 0) { + LOG_DEBUG("%s cod is 0, set as unclassified", __func__); cod = COD_UNCLASSIFIED; } @@ -1003,8 +1004,8 @@ static void btif_dm_ssp_key_notif_evt(tBTA_DM_SP_KEY_NOTIF *p_ssp_key_notif) pairing_cb.is_ssp = TRUE; cod = devclass2uint(p_ssp_key_notif->dev_class); - if ( cod == 0) { - LOG_DEBUG("cod is 0, set as unclassified"); + if (cod == 0) { + LOG_DEBUG("%s cod is 0, set as unclassified", __func__); cod = COD_UNCLASSIFIED; } @@ -1247,8 +1248,8 @@ static void btif_dm_search_devices_evt (UINT16 event, char *p_param) cod = devclass2uint (p_search_data->inq_res.dev_class); - if ( cod == 0) { - LOG_DEBUG("cod is 0, set as unclassified"); + if (cod == 0) { + LOG_DEBUG("%s cod is 0, set as unclassified", __func__); cod = COD_UNCLASSIFIED; } @@ -1407,7 +1408,7 @@ static void btif_dm_search_services_evt(UINT16 event, char *p_param) { char temp[256]; uuid_to_string_legacy((bt_uuid_t*)(p_data->disc_res.p_uuid_list + (i*MAX_UUID_SIZE)), temp); - BTIF_TRACE_ERROR("Index: %d uuid:%s", i, temp); + LOG_INFO("%s index:%d uuid:%s", __func__, i, temp); } } @@ -1467,7 +1468,7 @@ static void btif_dm_search_services_evt(UINT16 event, char *p_param) } uuid_to_string_legacy(&uuid, temp); - BTIF_TRACE_ERROR(" uuid:%s", temp); + LOG_INFO("%s uuid:%s", __func__, temp); bdcpy(bd_addr.address, p_data->disc_ble_res.bd_addr); prop.type = BT_PROPERTY_UUIDS; diff --git a/btif/src/btif_gatt.c b/btif/src/btif_gatt.c index ebc03b6a9..50ebaee54 100644 --- a/btif/src/btif_gatt.c +++ b/btif/src/btif_gatt.c @@ -32,7 +32,7 @@ #include <errno.h> #include <string.h> -#define LOG_TAG "BtGatt.btif" +#define LOG_TAG "bt_btif_gatt" #include "btif_common.h" #include "btif_util.h" diff --git a/btif/src/btif_gatt_client.c b/btif/src/btif_gatt_client.c index bfffcd471..131405587 100644 --- a/btif/src/btif_gatt_client.c +++ b/btif/src/btif_gatt_client.c @@ -31,7 +31,7 @@ #include <errno.h> #include <string.h> -#define LOG_TAG "BtGatt.btif" +#define LOG_TAG "bt_btif_gattc" #include "btcore/include/bdaddr.h" #include "btif_common.h" diff --git a/btif/src/btif_gatt_multi_adv_util.c b/btif/src/btif_gatt_multi_adv_util.c index 2a61cc8ec..7e5dc8d95 100644 --- a/btif/src/btif_gatt_multi_adv_util.c +++ b/btif/src/btif_gatt_multi_adv_util.c @@ -30,7 +30,7 @@ #include "btu.h" #include "bt_target.h" -#define LOG_TAG "BtGatt.btif" +#define LOG_TAG "bt_btif_gatt" #if (BLE_INCLUDED == TRUE) #include "btif_gatt_multi_adv_util.h" diff --git a/btif/src/btif_gatt_server.c b/btif/src/btif_gatt_server.c index 3a4fa29a8..1632b0180 100644 --- a/btif/src/btif_gatt_server.c +++ b/btif/src/btif_gatt_server.c @@ -32,7 +32,7 @@ #include <errno.h> #include <string.h> -#define LOG_TAG "BtGatt.btif" +#define LOG_TAG "bt_btif_gatt" #include "btif_common.h" #include "btif_util.h" diff --git a/btif/src/btif_gatt_test.c b/btif/src/btif_gatt_test.c index 219136f0c..4ccf5b04d 100644 --- a/btif/src/btif_gatt_test.c +++ b/btif/src/btif_gatt_test.c @@ -24,7 +24,7 @@ #include <errno.h> #include <string.h> -#define LOG_TAG "BtGatt.btif_test" +#define LOG_TAG "bt_btif_gatt" #include "btif_common.h" #include "btif_util.h" diff --git a/btif/src/btif_gatt_util.c b/btif/src/btif_gatt_util.c index df0600b97..11a41ea09 100644 --- a/btif/src/btif_gatt_util.c +++ b/btif/src/btif_gatt_util.c @@ -23,7 +23,7 @@ #include <errno.h> #include <string.h> -#define LOG_TAG "BtGatt.btif" +#define LOG_TAG "bt_btif_gatt" #include "btcore/include/bdaddr.h" #include "bta_api.h" diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index 02006cd08..25ced488a 100644 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -29,7 +29,7 @@ #include <hardware/bt_hf.h> #include <stdlib.h> -#define LOG_TAG "BTIF_HF" +#define LOG_TAG "bt_btif_hf" #include "btif_common.h" #include "btif_util.h" #include "btif_profile_queue.h" diff --git a/btif/src/btif_hf_client.c b/btif/src/btif_hf_client.c index 196578b7e..7bc2d9adb 100644 --- a/btif/src/btif_hf_client.c +++ b/btif/src/btif_hf_client.c @@ -31,7 +31,7 @@ #include <stdlib.h> #include <cutils/properties.h> -#define LOG_TAG "BTIF_HF_CLIENT" +#define LOG_TAG "bt_btif_hfc" #include "btif_common.h" #include "btif_util.h" #include "btif_profile_queue.h" diff --git a/btif/src/btif_hh.c b/btif/src/btif_hh.c index 99ce37331..20c8e3c9d 100644 --- a/btif/src/btif_hh.c +++ b/btif/src/btif_hh.c @@ -31,7 +31,7 @@ #include <errno.h> #include <string.h> -#define LOG_TAG "BTIF_HH" +#define LOG_TAG "bt_btif_hh" #include "bta_api.h" #include "bta_hh_api.h" diff --git a/btif/src/btif_hl.c b/btif/src/btif_hl.c index 1d7394de1..d11ba25e7 100644 --- a/btif/src/btif_hl.c +++ b/btif/src/btif_hl.c @@ -24,7 +24,7 @@ * * ***********************************************************************************/ -#define LOG_TAG "BTIF_HL" +#define LOG_TAG "bt_btif_hl" #include <assert.h> #include <ctype.h> diff --git a/btif/src/btif_mce.c b/btif/src/btif_mce.c index 9961e2d8b..bf4c3bd1b 100644 --- a/btif/src/btif_mce.c +++ b/btif/src/btif_mce.c @@ -30,7 +30,7 @@ #include <hardware/bt_mce.h> #include <stdlib.h> -#define LOG_TAG "BTIF_MCE" +#define LOG_TAG "bt_btif_mce" #include "btif_common.h" #include "btif_util.h" #include "btif_profile_queue.h" diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c index 2ff766441..d1dac727f 100644 --- a/btif/src/btif_media_task.c +++ b/btif/src/btif_media_task.c @@ -26,7 +26,7 @@ ** ******************************************************************************/ -#define LOG_TAG "btif-media" +#define LOG_TAG "bt_btif_media" #include <assert.h> #include <string.h> diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c index c412f2baa..d7228c313 100644 --- a/btif/src/btif_pan.c +++ b/btif/src/btif_pan.c @@ -46,7 +46,7 @@ #include <linux/if_tun.h> #include <linux/if_ether.h> -#define LOG_TAG "BTIF_PAN" +#define LOG_TAG "bt_btif_pan" #include "btif_common.h" #include "btif_util.h" #include "btm_api.h" diff --git a/btif/src/btif_profile_queue.c b/btif/src/btif_profile_queue.c index 0d3e49e19..87a008cf6 100644 --- a/btif/src/btif_profile_queue.c +++ b/btif/src/btif_profile_queue.c @@ -27,7 +27,7 @@ #include <assert.h> #include <hardware/bluetooth.h> -#define LOG_TAG "BTIF_QUEUE" +#define LOG_TAG "bt_btif_queue" #include "btif_common.h" #include "btif_profile_queue.h" #include "gki.h" diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c index 7a9eaf674..80a10da98 100644 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -31,7 +31,7 @@ #include "avrc_defs.h" #include "gki.h" -#define LOG_TAG "BTIF_RC" +#define LOG_TAG "bt_btif_avrc" #include "btif_common.h" #include "btif_util.h" #include "btif_av.h" diff --git a/btif/src/btif_sm.c b/btif/src/btif_sm.c index f8b4fea51..61409aeac 100644 --- a/btif/src/btif_sm.c +++ b/btif/src/btif_sm.c @@ -25,7 +25,7 @@ * *****************************************************************************/ -#define LOG_TAG "BTIF_SM" +#define LOG_TAG "bt_btif" #include <hardware/bluetooth.h> diff --git a/btif/src/btif_sock.c b/btif/src/btif_sock.c index 072132489..831ae7341 100644 --- a/btif/src/btif_sock.c +++ b/btif/src/btif_sock.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "btif_sock" +#define LOG_TAG "bt_btif_sock" #include <assert.h> #include <hardware/bluetooth.h> diff --git a/btif/src/btif_sock_rfc.c b/btif/src/btif_sock_rfc.c index 50ed08d64..1cd25a390 100644 --- a/btif/src/btif_sock_rfc.c +++ b/btif/src/btif_sock_rfc.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "btif_sock_rfcomm" +#define LOG_TAG "bt_btif_sock_rfcomm" #include <assert.h> #include <errno.h> diff --git a/btif/src/btif_sock_sco.c b/btif/src/btif_sock_sco.c index 26d37dcd8..2c6be49d3 100644 --- a/btif/src/btif_sock_sco.c +++ b/btif/src/btif_sock_sco.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "btif_sock_sco" +#define LOG_TAG "bt_btif_sock_sco" #include <assert.h> #include <hardware/bluetooth.h> diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c index f929c1f79..1fcae8f4f 100644 --- a/btif/src/btif_sock_sdp.c +++ b/btif/src/btif_sock_sdp.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "BTIF_SOCK_SDP" +#define LOG_TAG "bt_btif_sock_sdp" #include <stdint.h> #include <stdbool.h> diff --git a/btif/src/btif_sock_thread.c b/btif/src/btif_sock_thread.c index b83f83dd7..7e4e83910 100644 --- a/btif/src/btif_sock_thread.c +++ b/btif/src/btif_sock_thread.c @@ -48,7 +48,7 @@ #include <cutils/sockets.h> #include <alloca.h> -#define LOG_TAG "BTIF_SOCK" +#define LOG_TAG "bt_btif_sock" #include "btif_common.h" #include "btif_util.h" diff --git a/btif/src/btif_sock_util.c b/btif/src/btif_sock_util.c index 973837186..ee49eeba5 100644 --- a/btif/src/btif_sock_util.c +++ b/btif/src/btif_sock_util.c @@ -45,7 +45,7 @@ #include <netinet/tcp.h> -#define LOG_TAG "BTIF_SOCK" +#define LOG_TAG "bt_btif_sock" #include "btif_common.h" #include "btif_util.h" diff --git a/btif/src/btif_storage.c b/btif/src/btif_storage.c index 69018e198..c8e526414 100644 --- a/btif/src/btif_storage.c +++ b/btif/src/btif_storage.c @@ -36,7 +36,7 @@ #include <hardware/bluetooth.h> #include "btif_config.h" -#define LOG_TAG "BTIF_STORAGE" +#define LOG_TAG "bt_btif_storage" #include "btif_api.h" #include "btif_storage.h" @@ -606,7 +606,7 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t *property) uint32_t i; tBTA_SERVICE_MASK service_mask = btif_get_enabled_services_mask(); - BTIF_TRACE_ERROR("%s service_mask:0x%x", __FUNCTION__, service_mask); + LOG_INFO("%s service_mask:0x%x", __FUNCTION__, service_mask); for (i=0; i < BTA_MAX_SERVICE_ID; i++) { /* This should eventually become a function when more services are enabled */ diff --git a/btif/src/btif_util.c b/btif/src/btif_util.c index 2abfb130f..42576eb86 100644 --- a/btif/src/btif_util.c +++ b/btif/src/btif_util.c @@ -36,7 +36,7 @@ #include <ctype.h> -#define LOG_TAG "BTIF_UTIL" +#define LOG_TAG "bt_btif_util" #include "btif_common.h" #include "bta_api.h" #include "gki.h" diff --git a/hci/src/btsnoop.c b/hci/src/btsnoop.c index 5fc309fe5..869b075ca 100644 --- a/hci/src/btsnoop.c +++ b/hci/src/btsnoop.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "btsnoop" +#define LOG_TAG "bt_snoop" #include <assert.h> #include <errno.h> diff --git a/hci/src/btsnoop_net.c b/hci/src/btsnoop_net.c index 1db4f3a06..c601da811 100644 --- a/hci/src/btsnoop_net.c +++ b/hci/src/btsnoop_net.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "btsnoop_net" +#define LOG_TAG "bt_snoop_net" #include <assert.h> #include <errno.h> diff --git a/main/bte_conf.c b/main/bte_conf.c index 31a9a64c5..75738e1cd 100644 --- a/main/bte_conf.c +++ b/main/bte_conf.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "bte_conf" +#define LOG_TAG "bt_bte_conf" #include <assert.h> #include <stdio.h> diff --git a/main/bte_logmsg.c b/main/bte_logmsg.c index c976254bd..3258f47ca 100644 --- a/main/bte_logmsg.c +++ b/main/bte_logmsg.c @@ -78,55 +78,55 @@ /* LayerIDs for BTA, currently everything maps onto appl_trace_level */ static const char * const bt_layer_tags[] = { - "bt-btif", - "bt-usb", - "bt-serial", - "bt-socket", - "bt-rs232", - "bt-lc", - "bt-lm", - "bt-hci", - "bt-l2cap", - "bt-rfcomm", - "bt-sdp", - "bt-tcs", - "bt-obex", - "bt-btm", - "bt-gap", + "bt_btif", + "bt_usb", + "bt_serial", + "bt_socket", + "bt_rs232", + "bt_lc", + "bt_lm", + "bt_hci", + "bt_l2cap", + "bt_rfcomm", + "bt_sdp", + "bt_tcs", + "bt_obex", + "bt_btm", + "bt_gap", "UNUSED", "UNUSED", - "bt-icp", - "bt-hsp2", - "bt-spp", - "bt-ctp", - "bt-bpp", - "bt-hcrp", - "bt-ftp", - "bt-opp", - "bt-btu", - "bt-gki", - "bt-bnep", - "bt-pan", - "bt-hfp", - "bt-hid", - "bt-bip", - "bt-avp", - "bt-a2d", - "bt-sap", - "bt-amp", - "bt-mca", - "bt-att", - "bt-smp", - "bt-nfc", - "bt-nci", - "bt-idep", - "bt-ndep", - "bt-llcp", - "bt-rw", - "bt-ce", - "bt-snep", - "bt-ndef", - "bt-nfa", + "bt_icp", + "bt_hsp2", + "bt_spp", + "bt_ctp", + "bt_bpp", + "bt_hcrp", + "bt_ftp", + "bt_opp", + "bt_btu", + "bt_gki", + "bt_bnep", + "bt_pan", + "bt_hfp", + "bt_hid", + "bt_bip", + "bt_avp", + "bt_a2d", + "bt_sap", + "bt_amp", + "bt_mca", + "bt_att", + "bt_smp", + "bt_nfc", + "bt_nci", + "bt_idep", + "bt_ndep", + "bt_llcp", + "bt_rw", + "bt_ce", + "bt_snep", + "bt_ndef", + "bt_nfa", }; static uint8_t BTAPP_SetTraceLevel(uint8_t new_level); static uint8_t BTIF_SetTraceLevel(uint8_t new_level); diff --git a/osi/src/allocation_tracker.c b/osi/src/allocation_tracker.c index c6a430301..baa820bb7 100644 --- a/osi/src/allocation_tracker.c +++ b/osi/src/allocation_tracker.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "bt_allocation_tracker" +#define LOG_TAG "bt_osi_allocation_tracker" #include <assert.h> #include <pthread.h> diff --git a/osi/src/array.c b/osi/src/array.c index 33fa38cce..fb11887fd 100644 --- a/osi/src/array.c +++ b/osi/src/array.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "bt_array" +#define LOG_TAG "bt_osi_array" #include <assert.h> diff --git a/osi/src/buffer.c b/osi/src/buffer.c index aee65623b..ebf51aa53 100644 --- a/osi/src/buffer.c +++ b/osi/src/buffer.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "bt_buffer" +#define LOG_TAG "bt_osi_buffer" #include <assert.h> #include <stdint.h> diff --git a/osi/src/eager_reader.c b/osi/src/eager_reader.c index 887fe1a38..f12175457 100644 --- a/osi/src/eager_reader.c +++ b/osi/src/eager_reader.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "osi_eager_reader" +#define LOG_TAG "bt_osi_eager_reader" #include <assert.h> #include <errno.h> diff --git a/osi/src/future.c b/osi/src/future.c index 230218fa2..be140ad1e 100644 --- a/osi/src/future.c +++ b/osi/src/future.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "osi_future" +#define LOG_TAG "bt_osi_future" #include <assert.h> diff --git a/osi/src/semaphore.c b/osi/src/semaphore.c index 4c45b2e5e..b8dddcf2b 100644 --- a/osi/src/semaphore.c +++ b/osi/src/semaphore.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "osi_semaphore" +#define LOG_TAG "bt_osi_semaphore" #include <assert.h> #include <errno.h> diff --git a/osi/src/thread.c b/osi/src/thread.c index d60968b01..1380755f7 100644 --- a/osi/src/thread.c +++ b/osi/src/thread.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "osi_thread" +#define LOG_TAG "bt_osi_thread" #include <assert.h> #include <errno.h> diff --git a/stack/btm/btm_ble.c b/stack/btm/btm_ble.c index 562280c47..c6cfa2f07 100644 --- a/stack/btm/btm_ble.c +++ b/stack/btm/btm_ble.c @@ -39,6 +39,8 @@ #include "bt_utils.h" #include "vendor_ble.h" +#define LOG_TAG "bt_btm_ble" +#include "osi/include/log.h" #if SMP_INCLUDED == TRUE extern BOOLEAN AES_CMAC ( BT_OCTET16 key, UINT8 *input, UINT16 length, UINT16 tlen, UINT8 *p_signature); @@ -1527,11 +1529,11 @@ static void btm_ble_resolve_random_addr_on_conn_cmpl(void * p_rec, void *p_data) handle = HCID_GET_HANDLE (handle); - BTM_TRACE_EVENT ("btm_ble_resolve_random_addr_master_cmpl"); + BTM_TRACE_EVENT ("%s", __func__); if (match_rec) { - BTM_TRACE_ERROR("Random match"); + LOG_INFO("%s matched and resolved random address", __func__); match = TRUE; match_rec->ble.active_addr_type = BTM_BLE_ADDR_RRA; memcpy(match_rec->ble.cur_rand_addr, bda, BD_ADDR_LEN); @@ -1539,7 +1541,7 @@ static void btm_ble_resolve_random_addr_on_conn_cmpl(void * p_rec, void *p_data) } else { - BTM_TRACE_ERROR("Random unmatch"); + LOG_INFO("%s unable to match and resolve random address", __func__); } btm_ble_connected(bda, handle, HCI_ENCRYPT_MODE_DISABLED, role, bda_type, match); diff --git a/stack/btm/btm_ble_adv_filter.c b/stack/btm/btm_ble_adv_filter.c index 56c134fb8..ea87383b4 100644 --- a/stack/btm/btm_ble_adv_filter.c +++ b/stack/btm/btm_ble_adv_filter.c @@ -16,6 +16,8 @@ * ******************************************************************************/ +#define LOG_TAG "bt_btm_ble" + #include <string.h> #include "bt_target.h" @@ -254,7 +256,8 @@ void btm_ble_scan_pf_cmpl_cback(tBTM_VSC_CMPL *p_params) if (evt_len < 3 || evt_len > 4) { - BTM_TRACE_ERROR("cannot interpret APCF callback status = %d, length = %d", status, evt_len); + BTM_TRACE_ERROR("%s cannot interpret APCF callback status = %d, length = %d", + __func__, status, evt_len); btm_ble_advfilt_deq_op_q(&action, &ocf, &cb_evt, &ref_value, &p_scan_cfg_cback, &p_filt_param_cback); return; diff --git a/stack/btm/btm_ble_gap.c b/stack/btm/btm_ble_gap.c index 3aada69c1..0776d4167 100644 --- a/stack/btm/btm_ble_gap.c +++ b/stack/btm/btm_ble_gap.c @@ -43,6 +43,7 @@ #include "gatt_int.h" #include "btm_ble_int.h" +#define LOG_TAG "bt_btm_ble" #include "osi/include/log.h" #define BTM_BLE_NAME_SHORT 0x01 @@ -2529,7 +2530,8 @@ static void btm_ble_process_adv_pkt_cont(BD_ADDR bda, UINT8 addr_type, UINT8 evt if ((result = btm_ble_is_discoverable(bda, evt_type, p)) == 0) { - BTM_TRACE_ERROR("discard adv pkt"); + LOG_WARN("%s device is no longer discoverable so discarding advertising packet pkt", + __func__); return; } if (!update) diff --git a/stack/btm/btm_pm.c b/stack/btm/btm_pm.c index 1f7f59932..c70aafbda 100644 --- a/stack/btm/btm_pm.c +++ b/stack/btm/btm_pm.c @@ -28,7 +28,7 @@ * *****************************************************************************/ -#define LOG_TAG "bt_pm" +#define LOG_TAG "bt_btm_pm" #include <stdlib.h> #include <string.h> diff --git a/stack/btm/btm_sec.c b/stack/btm/btm_sec.c index 029eb39b2..af7615105 100644 --- a/stack/btm/btm_sec.c +++ b/stack/btm/btm_sec.c @@ -195,43 +195,39 @@ static BOOLEAN btm_serv_trusted(tBTM_SEC_DEV_REC *p_dev_rec, tBTM_SEC_SERV_REC * ** Returns TRUE if registered OK, else FALSE ** *******************************************************************************/ -BOOLEAN BTM_SecRegister (tBTM_APPL_INFO *p_cb_info) +BOOLEAN BTM_SecRegister(tBTM_APPL_INFO *p_cb_info) { #if BLE_INCLUDED == TRUE BT_OCTET16 temp_value = {0}; #endif - BTM_TRACE_EVENT ("BTM_Sec: application registered"); + BTM_TRACE_EVENT("%s application registered", __func__); #if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE + LOG_INFO("%s p_cb_info->p_le_callback == 0x%p", __func__, p_cb_info->p_le_callback); if (p_cb_info->p_le_callback) { - BTM_TRACE_ERROR ("BTM_SecRegister:p_cb_info->p_le_callback == 0x%x ", p_cb_info->p_le_callback); - - if (p_cb_info->p_le_callback) - { - #if SMP_INCLUDED == TRUE - BTM_TRACE_EVENT ("BTM_Sec: SMP_Register( btm_proc_smp_cback )"); - SMP_Register(btm_proc_smp_cback); - #endif - /* if no IR is loaded, need to regenerate all the keys */ - if (memcmp(btm_cb.devcb.id_keys.ir, &temp_value, sizeof(BT_OCTET16)) == 0) - { - btm_ble_reset_id(); - } - } - else - { - BTM_TRACE_ERROR ("BTM_SecRegister:p_cb_info->p_le_callback == NULL "); - } +#if SMP_INCLUDED == TRUE + BTM_TRACE_EVENT("%s SMP_Register( btm_proc_smp_cback )", __func__); + SMP_Register(btm_proc_smp_cback); +#endif + /* if no IR is loaded, need to regenerate all the keys */ + if (memcmp(btm_cb.devcb.id_keys.ir, &temp_value, sizeof(BT_OCTET16)) == 0) + { + btm_ble_reset_id(); + } + } + else + { + LOG_WARN("%s p_cb_info->p_le_callback == NULL", __func__); } #endif btm_cb.api = *p_cb_info; #if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE - BTM_TRACE_ERROR ("BTM_SecRegister: btm_cb.api.p_le_callback = 0x%x ", btm_cb.api.p_le_callback); + LOG_INFO("%s btm_cb.api.p_le_callback = 0x%p ", __func__, btm_cb.api.p_le_callback); #endif - BTM_TRACE_EVENT ("BTM_Sec: application registered"); + BTM_TRACE_EVENT("%s application registered", __func__); return(TRUE); } @@ -2194,7 +2190,7 @@ tBTM_STATUS btm_sec_l2cap_access_req (BD_ADDR bd_addr, UINT16 psm, UINT16 handle 2046 may report HCI_Encryption_Change and L2C Connection Request out of sequence because of data path issues. Delay this disconnect a little bit */ - BTM_TRACE_ERROR ("peer should have initiated security process by now (SM4 to SM4)"); + LOG_INFO("%s peer should have initiated security process by now (SM4 to SM4)", __func__); p_dev_rec->p_callback = p_callback; p_dev_rec->sec_state = BTM_SEC_STATE_DELAY_FOR_ENC; (*p_callback) (bd_addr, transport, p_ref_data, rc); @@ -4264,18 +4260,19 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason) p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */ #if BTM_DISC_DURING_RS == TRUE - BTM_TRACE_ERROR("btm_sec_disconnected - Clearing Pending flag"); + LOG_INFO("%s clearing pending flag handle:%d reason:%d", __func__, handle, reason); p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */ #endif /* clear unused flags */ p_dev_rec->sm4 &= BTM_SM4_TRUE; - BTM_TRACE_EVENT("btm_sec_disconnected() sec_req:x%x State: %s reason:%d bda:%04x%08x RName:%s", - p_dev_rec->security_required, btm_pair_state_descr(btm_cb.pairing_state), reason, (p_dev_rec->bd_addr[0]<<8)+p_dev_rec->bd_addr[1], - (p_dev_rec->bd_addr[2]<<24)+(p_dev_rec->bd_addr[3]<<16)+(p_dev_rec->bd_addr[4]<<8)+p_dev_rec->bd_addr[5], p_dev_rec->sec_bd_name); + uint8_t *bd_addr = (uint8_t *)p_dev_rec->bd_addr; + BTM_TRACE_EVENT("%s sec_req:x%x state:%s reason:%d bd_addr:%02x:%02x:%02x:%02x:%02x:%02x" + " remote_name:%s", __func__, p_dev_rec->security_required, btm_pair_state_descr(btm_cb.pairing_state), + reason, bd_addr[0], bd_addr[1], bd_addr[2], bd_addr[3], bd_addr[4], bd_addr[5], p_dev_rec->sec_bd_name); - BTM_TRACE_EVENT("before Update sec_flags=0x%x", p_dev_rec->sec_flags); + BTM_TRACE_EVENT("%s before update sec_flags=0x%x", __func__, p_dev_rec->sec_flags); /* If we are in the process of bonding we need to tell client that auth failed */ if ( (btm_cb.pairing_state != BTM_PAIR_STATE_IDLE) @@ -4332,7 +4329,7 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason) (*p_callback) (p_dev_rec->bd_addr, transport, p_dev_rec->p_ref_data, BTM_ERR_PROCESSING); } - BTM_TRACE_EVENT("after Update sec_flags=0x%x", p_dev_rec->sec_flags); + BTM_TRACE_EVENT("%s after update sec_flags=0x%x", __func__, p_dev_rec->sec_flags); } /******************************************************************************* diff --git a/stack/btu/btu_hcif.c b/stack/btu/btu_hcif.c index c7c52829d..c8a45d384 100644 --- a/stack/btu/btu_hcif.c +++ b/stack/btu/btu_hcif.c @@ -25,7 +25,7 @@ * ******************************************************************************/ -#define LOG_TAG "BTLD" +#define LOG_TAG "bt_btu_hcif" #include <assert.h> #include <stdlib.h> diff --git a/stack/btu/btu_task.c b/stack/btu/btu_task.c index e1e6db1c7..e2b899efd 100644 --- a/stack/btu/btu_task.c +++ b/stack/btu/btu_task.c @@ -16,7 +16,7 @@ * ******************************************************************************/ -#define LOG_TAG "btu_task" +#define LOG_TAG "bt_btu_task" #include <assert.h> #include <stdlib.h> diff --git a/stack/srvc/srvc_dis.c b/stack/srvc/srvc_dis.c index e29221282..4a1e1bbf6 100644 --- a/stack/srvc/srvc_dis.c +++ b/stack/srvc/srvc_dis.c @@ -23,6 +23,9 @@ #include "srvc_eng_int.h" #include "srvc_dis_int.h" +#define LOG_TAG "bt_srvc" +#include "osi/include/log.h" + #if BLE_INCLUDED == TRUE #define DIS_MAX_NUM_INC_SVR 0 @@ -197,9 +200,9 @@ UINT8 dis_read_attr_value (UINT8 clcb_idx, UINT16 handle, tGATT_VALUE *p_value, ** Returns void ** *******************************************************************************/ -void dis_gatt_c_read_dis_value_cmpl(UINT16 conn_id) +static void dis_gatt_c_read_dis_value_cmpl(UINT16 conn_id) { - tSRVC_CLCB *p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id); + tSRVC_CLCB *p_clcb = srvc_eng_find_clcb_by_conn_id(conn_id); dis_cb.dis_read_uuid_idx = 0xff; @@ -207,13 +210,12 @@ void dis_gatt_c_read_dis_value_cmpl(UINT16 conn_id) if (dis_cb.p_read_dis_cback && p_clcb) { - GATT_TRACE_ERROR("dis_gatt_c_read_dis_value_cmpl: attr_mask = 0x%04x", p_clcb->dis_value.attr_mask); - GATT_TRACE_EVENT("calling p_read_dis_cbackd"); + LOG_INFO("%s conn_id:%d attr_mask = 0x%04x", __func__, conn_id, + p_clcb->dis_value.attr_mask); (*dis_cb.p_read_dis_cback)(p_clcb->bda, &p_clcb->dis_value); - dis_cb.p_read_dis_cback=NULL; + dis_cb.p_read_dis_cback = NULL; } - } /******************************************************************************* diff --git a/utils/src/bt_utils.c b/utils/src/bt_utils.c index 3d5f0cf3e..1d1dcdd55 100644 --- a/utils/src/bt_utils.c +++ b/utils/src/bt_utils.c @@ -25,7 +25,7 @@ * ***********************************************************************************/ -#define LOG_TAG "BT_UTILS" +#define LOG_TAG "bt_utils" #include <cutils/properties.h> #include <cutils/sched_policy.h> |