diff options
author | Ravi Nagarajan <nravi@broadcom.com> | 2012-08-28 03:53:51 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-08-28 10:38:14 -0700 |
commit | 66c09fca910e0bb4066fbf6268592f78dfaec3c5 (patch) | |
tree | 91696f817585a5378fbc5887d237df47f35c4ac1 /btif | |
parent | 54cdfabe7c0ed98732d0641ffe8b19ff7284e7d4 (diff) | |
download | external_bluetooth_bluedroid-66c09fca910e0bb4066fbf6268592f78dfaec3c5.zip external_bluetooth_bluedroid-66c09fca910e0bb4066fbf6268592f78dfaec3c5.tar.gz external_bluetooth_bluedroid-66c09fca910e0bb4066fbf6268592f78dfaec3c5.tar.bz2 |
Log DM events
Add strings for DM event
Change-Id: I800780c181dd51cbf9bb037690ad167a5f8bf363
Diffstat (limited to 'btif')
-rwxr-xr-x[-rw-r--r--] | btif/include/btif_util.h | 1 | ||||
-rwxr-xr-x | btif/src/btif_dm.c | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | btif/src/btif_util.c | 33 |
3 files changed, 35 insertions, 1 deletions
diff --git a/btif/include/btif_util.h b/btif/include/btif_util.h index 075194d..cfa7945 100644..100755 --- a/btif/include/btif_util.h +++ b/btif/include/btif_util.h @@ -86,6 +86,7 @@ typedef char bdstr_t[18]; const char* dump_bt_status(bt_status_t status); const char* dump_dm_search_event(UINT16 event); +const char* dump_dm_event(UINT16 event); const char* dump_hf_event(UINT16 event); const char* dump_hh_event(UINT16 event); const char* dump_hf_conn_state(UINT16 event); diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index 31b6435..90131aa 100755 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -1107,7 +1107,7 @@ static void btif_dm_upstreams_evt(UINT16 event, char* p_param) uint32_t i; bt_bdaddr_t bd_addr; - BTIF_TRACE_EVENT1("btif_dm_upstreams_cback ev: %d", event); + BTIF_TRACE_EVENT1("btif_dm_upstreams_cback ev: %s", dump_dm_event(event)); switch (event) { diff --git a/btif/src/btif_util.c b/btif/src/btif_util.c index 07f1896..fb2e792 100644..100755 --- a/btif/src/btif_util.c +++ b/btif/src/btif_util.c @@ -276,6 +276,39 @@ const char* dump_property_type(bt_property_type_t type) } } +const char* dump_dm_event(UINT16 event) +{ + switch(event) + { + CASE_RETURN_STR(BTA_DM_ENABLE_EVT) + CASE_RETURN_STR(BTA_DM_DISABLE_EVT) + CASE_RETURN_STR(BTA_DM_PIN_REQ_EVT) + CASE_RETURN_STR(BTA_DM_AUTH_CMPL_EVT) + CASE_RETURN_STR(BTA_DM_AUTHORIZE_EVT) + CASE_RETURN_STR(BTA_DM_LINK_UP_EVT) + CASE_RETURN_STR(BTA_DM_LINK_DOWN_EVT) + CASE_RETURN_STR(BTA_DM_SIG_STRENGTH_EVT) + CASE_RETURN_STR(BTA_DM_BUSY_LEVEL_EVT) + CASE_RETURN_STR(BTA_DM_BOND_CANCEL_CMPL_EVT) + CASE_RETURN_STR(BTA_DM_SP_CFM_REQ_EVT) + CASE_RETURN_STR(BTA_DM_SP_KEY_NOTIF_EVT) + CASE_RETURN_STR(BTA_DM_SP_RMT_OOB_EVT) + CASE_RETURN_STR(BTA_DM_SP_KEYPRESS_EVT) + CASE_RETURN_STR(BTA_DM_ROLE_CHG_EVT) + CASE_RETURN_STR(BTA_DM_BLE_KEY_EVT) + CASE_RETURN_STR(BTA_DM_BLE_SEC_REQ_EVT) + CASE_RETURN_STR(BTA_DM_BLE_PASSKEY_NOTIF_EVT) + CASE_RETURN_STR(BTA_DM_BLE_PASSKEY_REQ_EVT) + CASE_RETURN_STR(BTA_DM_BLE_OOB_REQ_EVT) + CASE_RETURN_STR(BTA_DM_BLE_LOCAL_IR_EVT) + CASE_RETURN_STR(BTA_DM_BLE_LOCAL_ER_EVT) + CASE_RETURN_STR(BTA_DM_BLE_AUTH_CMPL_EVT) + CASE_RETURN_STR(BTA_DM_DEV_UNPAIRED_EVT) + + default: + return "UNKNOWN DM EVENT"; + } +} const char* dump_hf_event(UINT16 event) { |