Merge branch 'feature/btdm_gap' into feature/btdm_bluedroid

# Conflicts:
#	examples/07_blufi/components/bluedroid_demos/app_project/SampleClientProject.c
#	examples/07_blufi/components/bluedroid_demos/app_project/SampleServerProject.c
#	examples/07_blufi/components/bluedroid_demos/include/bt_app_common.h
This commit is contained in:
Tian Hao
2016-11-01 14:19:38 +08:00
54 changed files with 5515 additions and 471 deletions
+100 -100
View File
@@ -65,7 +65,7 @@ static void btm_process_remote_ext_features (tACL_CONN *p_acl_cb, UINT8 num_read
*******************************************************************************/
void btm_acl_init (void)
{
BTM_TRACE_DEBUG ("btm_acl_init");
BTM_TRACE_DEBUG ("btm_acl_init\n");
#if 0 /* cleared in btm_init; put back in if called from anywhere else! */
memset (&btm_cb.acl_db, 0, sizeof (btm_cb.acl_db));
memset (btm_cb.btm_scn, 0, BTM_MAX_SCN); /* Initialize the SCN usage to FALSE */
@@ -128,7 +128,7 @@ UINT8 btm_handle_to_acl_index (UINT16 hci_handle)
{
tACL_CONN *p = &btm_cb.acl_db[0];
UINT8 xx;
BTM_TRACE_DEBUG ("btm_handle_to_acl_index");
BTM_TRACE_DEBUG ("btm_handle_to_acl_index\n");
for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p++)
{
if ((p->in_use) && (p->hci_handle == hci_handle))
@@ -160,7 +160,7 @@ BOOLEAN btm_ble_get_acl_remote_addr(tBTM_SEC_DEV_REC *p_dev_rec, BD_ADDR conn_ad
if (p_dev_rec == NULL)
{
BTM_TRACE_ERROR("btm_ble_get_acl_remote_addr can not find device with matching address");
BTM_TRACE_ERROR("btm_ble_get_acl_remote_addr can not find device with matching address\n");
return FALSE;
}
@@ -182,7 +182,7 @@ BOOLEAN btm_ble_get_acl_remote_addr(tBTM_SEC_DEV_REC *p_dev_rec, BD_ADDR conn_ad
break;
default:
BTM_TRACE_ERROR("Unknown active address: %d", p_dev_rec->ble.active_addr_type);
BTM_TRACE_ERROR("Unknown active address: %d\n", p_dev_rec->ble.active_addr_type);
st = FALSE;
break;
}
@@ -213,7 +213,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
tACL_CONN *p;
UINT8 xx;
BTM_TRACE_DEBUG ("btm_acl_created hci_handle=%d link_role=%d transport=%d",
BTM_TRACE_DEBUG ("btm_acl_created hci_handle=%d link_role=%d transport=%d\n",
hci_handle,link_role, transport);
/* Ensure we don't have duplicates */
p = btm_bda_to_acl(bda, transport);
@@ -224,7 +224,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
#if BLE_INCLUDED == TRUE
p->transport = transport;
#endif
BTM_TRACE_DEBUG ("Duplicate btm_acl_created: RemBdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_DEBUG ("Duplicate btm_acl_created: RemBdAddr: %02x%02x%02x%02x%02x%02x\n",
bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
BTM_SetLinkPolicy(p->remote_addr, &btm_cb.btm_def_link_policy);
return;
@@ -275,7 +275,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
#if (BLE_INCLUDED == TRUE)
if (p_dev_rec )
{
BTM_TRACE_DEBUG ("device_type=0x%x", p_dev_rec->device_type);
BTM_TRACE_DEBUG ("device_type=0x%x\n", p_dev_rec->device_type);
}
#endif
@@ -294,7 +294,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
/* Store the Peer Security Capabilites (in SM4 and rmt_sec_caps) */
btm_sec_set_peer_sec_caps(p, p_dev_rec);
BTM_TRACE_API("%s: pend:%d", __FUNCTION__, req_pend);
BTM_TRACE_API("%s: pend:%d\n", __FUNCTION__, req_pend);
if (req_pend)
{
/* Request for remaining Security Features (if any) */
@@ -350,7 +350,7 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
void btm_acl_report_role_change (UINT8 hci_status, BD_ADDR bda)
{
tBTM_ROLE_SWITCH_CMPL ref_data;
BTM_TRACE_DEBUG ("btm_acl_report_role_change");
BTM_TRACE_DEBUG ("btm_acl_report_role_change\n");
if (btm_cb.devcb.p_switch_role_cb
&& (bda && (0 == memcmp(btm_cb.devcb.switch_role_ref_data.remote_bd_addr, bda, BD_ADDR_LEN))))
{
@@ -380,7 +380,7 @@ void btm_acl_removed (BD_ADDR bda, tBT_TRANSPORT transport)
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
tBTM_SEC_DEV_REC *p_dev_rec=NULL;
#endif
BTM_TRACE_DEBUG ("btm_acl_removed");
BTM_TRACE_DEBUG ("btm_acl_removed\n");
p = btm_bda_to_acl(bda, transport);
if (p != (tACL_CONN *)NULL)
{
@@ -411,7 +411,7 @@ void btm_acl_removed (BD_ADDR bda, tBT_TRANSPORT transport)
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
BTM_TRACE_DEBUG ("acl hci_handle=%d transport=%d connectable_mode=0x%0x link_role=%d",
BTM_TRACE_DEBUG ("acl hci_handle=%d transport=%d connectable_mode=0x%0x link_role=%d\n",
p->hci_handle,
p->transport,
btm_cb.ble_ctr_cb.inq_var.connectable_mode,
@@ -420,32 +420,32 @@ void btm_acl_removed (BD_ADDR bda, tBT_TRANSPORT transport)
p_dev_rec = btm_find_dev(bda);
if ( p_dev_rec)
{
BTM_TRACE_DEBUG("before update p_dev_rec->sec_flags=0x%x", p_dev_rec->sec_flags);
BTM_TRACE_DEBUG("before update p_dev_rec->sec_flags=0x%x\n", p_dev_rec->sec_flags);
if (p->transport == BT_TRANSPORT_LE)
{
BTM_TRACE_DEBUG("LE link down");
BTM_TRACE_DEBUG("LE link down\n");
p_dev_rec->sec_flags &= ~(BTM_SEC_LE_ENCRYPTED | BTM_SEC_ROLE_SWITCHED);
if ( (p_dev_rec->sec_flags & BTM_SEC_LE_LINK_KEY_KNOWN) == 0)
{
BTM_TRACE_DEBUG("Not Bonded");
BTM_TRACE_DEBUG("Not Bonded\n");
p_dev_rec->sec_flags &= ~(BTM_SEC_LE_LINK_KEY_AUTHED | BTM_SEC_LE_AUTHENTICATED);
}
else
{
BTM_TRACE_DEBUG("Bonded");
BTM_TRACE_DEBUG("Bonded\n");
}
}
else
{
BTM_TRACE_DEBUG("Bletooth link down");
BTM_TRACE_DEBUG("Bletooth link down\n");
p_dev_rec->sec_flags &= ~(BTM_SEC_AUTHORIZED | BTM_SEC_AUTHENTICATED
| BTM_SEC_ENCRYPTED | BTM_SEC_ROLE_SWITCHED);
}
BTM_TRACE_DEBUG("after update p_dev_rec->sec_flags=0x%x", p_dev_rec->sec_flags);
BTM_TRACE_DEBUG("after update p_dev_rec->sec_flags=0x%x\n", p_dev_rec->sec_flags);
}
else
{
BTM_TRACE_ERROR("Device not found");
BTM_TRACE_ERROR("Device not found\n");
}
#endif
@@ -470,12 +470,12 @@ void btm_acl_device_down (void)
{
tACL_CONN *p = &btm_cb.acl_db[0];
UINT16 xx;
BTM_TRACE_DEBUG ("btm_acl_device_down");
BTM_TRACE_DEBUG ("btm_acl_device_down\n");
for (xx = 0; xx < MAX_L2CAP_LINKS; xx++, p++)
{
if (p->in_use)
{
BTM_TRACE_DEBUG ("hci_handle=%d HCI_ERR_HW_FAILURE ",p->hci_handle );
BTM_TRACE_DEBUG ("hci_handle=%d HCI_ERR_HW_FAILURE \n",p->hci_handle );
l2c_link_hci_disc_comp (p->hci_handle, HCI_ERR_HW_FAILURE);
}
}
@@ -563,7 +563,7 @@ void btm_acl_update_busy_level (tBTM_BLI_EVENT event)
tBTM_STATUS BTM_GetRole (BD_ADDR remote_bd_addr, UINT8 *p_role)
{
tACL_CONN *p;
BTM_TRACE_DEBUG ("BTM_GetRole");
BTM_TRACE_DEBUG ("BTM_GetRole\n");
if ((p = btm_bda_to_acl(remote_bd_addr, BT_TRANSPORT_BR_EDR)) == NULL)
{
*p_role = BTM_ROLE_UNDEFINED;
@@ -606,7 +606,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
#if (BT_USE_TRACES == TRUE)
BD_ADDR_PTR p_bda;
#endif
BTM_TRACE_API ("BTM_SwitchRole BDA: %02x-%02x-%02x-%02x-%02x-%02x",
BTM_TRACE_API ("BTM_SwitchRole BDA: %02x-%02x-%02x-%02x-%02x-%02x\n",
remote_bd_addr[0], remote_bd_addr[1], remote_bd_addr[2],
remote_bd_addr[3], remote_bd_addr[4], remote_bd_addr[5]);
@@ -618,7 +618,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
{
#if (BT_USE_TRACES == TRUE)
p_bda = btm_cb.devcb.switch_role_ref_data.remote_bd_addr;
BTM_TRACE_DEBUG ("Role switch on other device is in progress 0x%02x%02x%02x%02x%02x%02x",
BTM_TRACE_DEBUG ("Role switch on other device is in progress 0x%02x%02x%02x%02x%02x%02x\n",
p_bda[0], p_bda[1], p_bda[2],
p_bda[3], p_bda[4], p_bda[5]);
#endif
@@ -643,7 +643,7 @@ tBTM_STATUS BTM_SwitchRole (BD_ADDR remote_bd_addr, UINT8 new_role, tBTM_CMPL_CB
/* Ignore role switch request if the previous request was not completed */
if (p->switch_role_state != BTM_ACL_SWKEY_STATE_IDLE)
{
BTM_TRACE_DEBUG ("BTM_SwitchRole busy: %d",
BTM_TRACE_DEBUG ("BTM_SwitchRole busy: %d\n",
p->switch_role_state);
return(BTM_BUSY);
}
@@ -727,7 +727,7 @@ void btm_acl_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
tBTM_SEC_DEV_REC *p_dev_rec;
tBTM_BL_ROLE_CHG_DATA evt;
BTM_TRACE_DEBUG ("btm_acl_encrypt_change handle=%d status=%d encr_enabl=%d",
BTM_TRACE_DEBUG ("btm_acl_encrypt_change handle=%d status=%d encr_enabl=%d\n",
handle, status, encr_enable);
xx = btm_handle_to_acl_index(handle);
/* don't assume that we can never get a bad hci_handle */
@@ -782,7 +782,7 @@ void btm_acl_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
evt.hci_status = btm_cb.devcb.switch_role_ref_data.hci_status;
(*btm_cb.p_bl_changed_cb)((tBTM_BL_EVENT_DATA *)&evt);
BTM_TRACE_DEBUG("Role Switch Event: new_role 0x%02x, HCI Status 0x%02x, rs_st:%d",
BTM_TRACE_DEBUG("Role Switch Event: new_role 0x%02x, HCI Status 0x%02x, rs_st:%d\n",
evt.new_role, evt.hci_status, p->switch_role_state);
}
@@ -792,10 +792,10 @@ void btm_acl_encrypt_change (UINT16 handle, UINT8 status, UINT8 encr_enable)
{
if (p_dev_rec->rs_disc_pending == BTM_SEC_DISC_PENDING)
{
BTM_TRACE_WARNING("btm_acl_encrypt_change -> Issuing delayed HCI_Disconnect!!!");
BTM_TRACE_WARNING("btm_acl_encrypt_change -> Issuing delayed HCI_Disconnect!!!\n");
btsnd_hcic_disconnect(p_dev_rec->hci_handle, HCI_ERR_PEER_USER);
}
BTM_TRACE_ERROR("btm_acl_encrypt_change: tBTM_SEC_DEV:0x%x rs_disc_pending=%d",
BTM_TRACE_ERROR("btm_acl_encrypt_change: tBTM_SEC_DEV:0x%x rs_disc_pending=%d\n",
(UINT32)p_dev_rec, p_dev_rec->rs_disc_pending);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
}
@@ -815,7 +815,7 @@ tBTM_STATUS BTM_SetLinkPolicy (BD_ADDR remote_bda, UINT16 *settings)
{
tACL_CONN *p;
UINT8 *localFeatures = BTM_ReadLocalFeatures();
BTM_TRACE_DEBUG ("BTM_SetLinkPolicy");
BTM_TRACE_DEBUG ("BTM_SetLinkPolicy\n");
/* BTM_TRACE_API ("BTM_SetLinkPolicy: requested settings: 0x%04x", *settings ); */
/* First, check if hold mode is supported */
@@ -824,22 +824,22 @@ tBTM_STATUS BTM_SetLinkPolicy (BD_ADDR remote_bda, UINT16 *settings)
if ( (*settings & HCI_ENABLE_MASTER_SLAVE_SWITCH) && (!HCI_SWITCH_SUPPORTED(localFeatures)) )
{
*settings &= (~HCI_ENABLE_MASTER_SLAVE_SWITCH);
BTM_TRACE_API ("BTM_SetLinkPolicy switch not supported (settings: 0x%04x)", *settings );
BTM_TRACE_API ("BTM_SetLinkPolicy switch not supported (settings: 0x%04x)\n", *settings );
}
if ( (*settings & HCI_ENABLE_HOLD_MODE) && (!HCI_HOLD_MODE_SUPPORTED(localFeatures)) )
{
*settings &= (~HCI_ENABLE_HOLD_MODE);
BTM_TRACE_API ("BTM_SetLinkPolicy hold not supported (settings: 0x%04x)", *settings );
BTM_TRACE_API ("BTM_SetLinkPolicy hold not supported (settings: 0x%04x)\n", *settings );
}
if ( (*settings & HCI_ENABLE_SNIFF_MODE) && (!HCI_SNIFF_MODE_SUPPORTED(localFeatures)) )
{
*settings &= (~HCI_ENABLE_SNIFF_MODE);
BTM_TRACE_API ("BTM_SetLinkPolicy sniff not supported (settings: 0x%04x)", *settings );
BTM_TRACE_API ("BTM_SetLinkPolicy sniff not supported (settings: 0x%04x)\n", *settings );
}
if ( (*settings & HCI_ENABLE_PARK_MODE) && (!HCI_PARK_MODE_SUPPORTED(localFeatures)) )
{
*settings &= (~HCI_ENABLE_PARK_MODE);
BTM_TRACE_API ("BTM_SetLinkPolicy park not supported (settings: 0x%04x)", *settings );
BTM_TRACE_API ("BTM_SetLinkPolicy park not supported (settings: 0x%04x)\n", *settings );
}
}
@@ -864,29 +864,29 @@ void BTM_SetDefaultLinkPolicy (UINT16 settings)
{
UINT8 *localFeatures = BTM_ReadLocalFeatures();
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy setting:0x%04x", settings);
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy setting:0x%04x\n", settings);
if((settings & HCI_ENABLE_MASTER_SLAVE_SWITCH) && (!HCI_SWITCH_SUPPORTED(localFeatures)))
{
settings &= ~HCI_ENABLE_MASTER_SLAVE_SWITCH;
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy switch not supported (settings: 0x%04x)", settings);
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy switch not supported (settings: 0x%04x)\n", settings);
}
if ((settings & HCI_ENABLE_HOLD_MODE) && (!HCI_HOLD_MODE_SUPPORTED(localFeatures)))
{
settings &= ~HCI_ENABLE_HOLD_MODE;
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy hold not supported (settings: 0x%04x)", settings);
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy hold not supported (settings: 0x%04x)\n", settings);
}
if ((settings & HCI_ENABLE_SNIFF_MODE) && (!HCI_SNIFF_MODE_SUPPORTED(localFeatures)))
{
settings &= ~HCI_ENABLE_SNIFF_MODE;
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy sniff not supported (settings: 0x%04x)", settings);
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy sniff not supported (settings: 0x%04x)\n", settings);
}
if ((settings & HCI_ENABLE_PARK_MODE) && (!HCI_PARK_MODE_SUPPORTED(localFeatures)))
{
settings &= ~HCI_ENABLE_PARK_MODE;
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy park not supported (settings: 0x%04x)", settings);
BTM_TRACE_DEBUG("BTM_SetDefaultLinkPolicy park not supported (settings: 0x%04x)\n", settings);
}
BTM_TRACE_DEBUG("Set DefaultLinkPolicy:0x%04x", settings);
BTM_TRACE_DEBUG("Set DefaultLinkPolicy:0x%04x\n", settings);
btm_cb.btm_def_link_policy = settings;
@@ -910,7 +910,7 @@ void btm_read_remote_version_complete (UINT8 *p)
UINT8 status;
UINT16 handle;
int xx;
BTM_TRACE_DEBUG ("btm_read_remote_version_complete");
BTM_TRACE_DEBUG ("btm_read_remote_version_complete\n");
STREAM_TO_UINT8 (status, p);
STREAM_TO_UINT16 (handle, p);
@@ -952,7 +952,7 @@ void btm_process_remote_ext_features (tACL_CONN *p_acl_cb, UINT8 num_read_pages)
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev_by_handle (handle);
UINT8 page_idx;
BTM_TRACE_DEBUG ("btm_process_remote_ext_features");
BTM_TRACE_DEBUG ("btm_process_remote_ext_features\n");
/* Make sure we have the record to save remote features information */
if (p_dev_rec == NULL)
@@ -969,7 +969,7 @@ void btm_process_remote_ext_features (tACL_CONN *p_acl_cb, UINT8 num_read_pages)
{
if (page_idx > HCI_EXT_FEATURES_PAGE_MAX)
{
BTM_TRACE_ERROR("%s: page=%d unexpected", __FUNCTION__, page_idx);
BTM_TRACE_ERROR("%s: page=%d unexpected\n", __FUNCTION__, page_idx);
break;
}
memcpy (p_dev_rec->features[page_idx], p_acl_cb->peer_lmp_features[page_idx],
@@ -981,7 +981,7 @@ void btm_process_remote_ext_features (tACL_CONN *p_acl_cb, UINT8 num_read_pages)
/* Store the Peer Security Capabilites (in SM4 and rmt_sec_caps) */
btm_sec_set_peer_sec_caps(p_acl_cb, p_dev_rec);
BTM_TRACE_API("%s: pend:%d", __FUNCTION__, req_pend);
BTM_TRACE_API("%s: pend:%d\n", __FUNCTION__, req_pend);
if (req_pend)
{
/* Request for remaining Security Features (if any) */
@@ -1005,11 +1005,11 @@ void btm_read_remote_features (UINT16 handle)
UINT8 acl_idx;
tACL_CONN *p_acl_cb;
BTM_TRACE_DEBUG("btm_read_remote_features() handle: %d", handle);
BTM_TRACE_DEBUG("btm_read_remote_features() handle: %d\n", handle);
if ((acl_idx = btm_handle_to_acl_index(handle)) >= MAX_L2CAP_LINKS)
{
BTM_TRACE_ERROR("btm_read_remote_features handle=%d invalid", handle);
BTM_TRACE_ERROR("btm_read_remote_features handle=%d invalid\n", handle);
return;
}
@@ -1034,7 +1034,7 @@ void btm_read_remote_features (UINT16 handle)
*******************************************************************************/
void btm_read_remote_ext_features (UINT16 handle, UINT8 page_number)
{
BTM_TRACE_DEBUG("btm_read_remote_ext_features() handle: %d page: %d", handle, page_number);
BTM_TRACE_DEBUG("btm_read_remote_ext_features() handle: %d page: %d\n", handle, page_number);
btsnd_hcic_rmt_ext_features(handle, page_number);
}
@@ -1057,12 +1057,12 @@ void btm_read_remote_features_complete (UINT8 *p)
UINT16 handle;
UINT8 acl_idx;
BTM_TRACE_DEBUG ("btm_read_remote_features_complete");
BTM_TRACE_DEBUG ("btm_read_remote_features_complete\n");
STREAM_TO_UINT8 (status, p);
if (status != HCI_SUCCESS)
{
BTM_TRACE_ERROR ("btm_read_remote_features_complete failed (status 0x%02x)", status);
BTM_TRACE_ERROR ("btm_read_remote_features_complete failed (status 0x%02x)\n", status);
return;
}
@@ -1070,7 +1070,7 @@ void btm_read_remote_features_complete (UINT8 *p)
if ((acl_idx = btm_handle_to_acl_index(handle)) >= MAX_L2CAP_LINKS)
{
BTM_TRACE_ERROR("btm_read_remote_features_complete handle=%d invalid", handle);
BTM_TRACE_ERROR("btm_read_remote_features_complete handle=%d invalid\n", handle);
return;
}
@@ -1086,7 +1086,7 @@ void btm_read_remote_features_complete (UINT8 *p)
/* if the remote controller has extended features and local controller supports
** HCI_Read_Remote_Extended_Features command then start reading these feature starting
** with extended features page 1 */
BTM_TRACE_DEBUG ("Start reading remote extended features");
BTM_TRACE_DEBUG ("Start reading remote extended features\n");
btm_read_remote_ext_features(handle, HCI_EXT_FEATURES_PAGE_1);
return;
}
@@ -1116,7 +1116,7 @@ void btm_read_remote_ext_features_complete (UINT8 *p)
UINT16 handle;
UINT8 acl_idx;
BTM_TRACE_DEBUG ("btm_read_remote_ext_features_complete");
BTM_TRACE_DEBUG ("btm_read_remote_ext_features_complete\n");
++p;
STREAM_TO_UINT16 (handle, p);
@@ -1126,7 +1126,7 @@ void btm_read_remote_ext_features_complete (UINT8 *p)
/* Validate parameters */
if ((acl_idx = btm_handle_to_acl_index(handle)) >= MAX_L2CAP_LINKS)
{
BTM_TRACE_ERROR("btm_read_remote_ext_features_complete handle=%d invalid", handle);
BTM_TRACE_ERROR("btm_read_remote_ext_features_complete handle=%d invalid\n", handle);
return;
}
@@ -1146,13 +1146,13 @@ void btm_read_remote_ext_features_complete (UINT8 *p)
if ((page_num < max_page) && (page_num < HCI_EXT_FEATURES_PAGE_MAX))
{
page_num++;
BTM_TRACE_DEBUG("BTM reads next remote extended features page (%d)", page_num);
BTM_TRACE_DEBUG("BTM reads next remote extended features page (%d)\n", page_num);
btm_read_remote_ext_features (handle, page_num);
return;
}
/* Reading of remote feature pages is complete */
BTM_TRACE_DEBUG("BTM reached last remote extended features page (%d)", page_num);
BTM_TRACE_DEBUG("BTM reached last remote extended features page (%d)\n", page_num);
/* Process the pages */
btm_process_remote_ext_features (p_acl_cb, (UINT8) (page_num + 1));
@@ -1176,12 +1176,12 @@ void btm_read_remote_ext_features_failed (UINT8 status, UINT16 handle)
tACL_CONN *p_acl_cb;
UINT8 acl_idx;
BTM_TRACE_WARNING ("btm_read_remote_ext_features_failed (status 0x%02x) for handle %d",
BTM_TRACE_WARNING ("btm_read_remote_ext_features_failed (status 0x%02x) for handle %d\n",
status, handle);
if ((acl_idx = btm_handle_to_acl_index(handle)) >= MAX_L2CAP_LINKS)
{
BTM_TRACE_ERROR("btm_read_remote_ext_features_failed handle=%d invalid", handle);
BTM_TRACE_ERROR("btm_read_remote_ext_features_failed handle=%d invalid\n", handle);
return;
}
@@ -1207,7 +1207,7 @@ void btm_read_remote_ext_features_failed (UINT8 status, UINT16 handle)
void btm_establish_continue (tACL_CONN *p_acl_cb)
{
tBTM_BL_EVENT_DATA evt_data;
BTM_TRACE_DEBUG ("btm_establish_continue");
BTM_TRACE_DEBUG ("btm_establish_continue\n");
#if (!defined(BTM_BYPASS_EXTRA_ACL_SETUP) || BTM_BYPASS_EXTRA_ACL_SETUP == FALSE)
#if (defined BLE_INCLUDED && BLE_INCLUDED == TRUE)
if (p_acl_cb->transport == BT_TRANSPORT_BR_EDR)
@@ -1255,7 +1255,7 @@ void btm_establish_continue (tACL_CONN *p_acl_cb)
*******************************************************************************/
void BTM_SetDefaultLinkSuperTout (UINT16 timeout)
{
BTM_TRACE_DEBUG ("BTM_SetDefaultLinkSuperTout");
BTM_TRACE_DEBUG ("BTM_SetDefaultLinkSuperTout\n");
btm_cb.btm_def_link_super_tout = timeout;
}
@@ -1272,7 +1272,7 @@ tBTM_STATUS BTM_GetLinkSuperTout (BD_ADDR remote_bda, UINT16 *p_timeout)
{
tACL_CONN *p = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_GetLinkSuperTout");
BTM_TRACE_DEBUG ("BTM_GetLinkSuperTout\n");
if (p != (tACL_CONN *)NULL)
{
*p_timeout = p->link_super_tout;
@@ -1296,7 +1296,7 @@ tBTM_STATUS BTM_SetLinkSuperTout (BD_ADDR remote_bda, UINT16 timeout)
{
tACL_CONN *p = btm_bda_to_acl(remote_bda, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_SetLinkSuperTout");
BTM_TRACE_DEBUG ("BTM_SetLinkSuperTout\n");
if (p != (tACL_CONN *)NULL)
{
p->link_super_tout = timeout;
@@ -1332,7 +1332,7 @@ BOOLEAN BTM_IsAclConnectionUp (BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tACL_CONN *p;
BTM_TRACE_API ("BTM_IsAclConnectionUp: RemBdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_API ("BTM_IsAclConnectionUp: RemBdAddr: %02x%02x%02x%02x%02x%02x\n",
remote_bda[0], remote_bda[1], remote_bda[2],
remote_bda[3], remote_bda[4], remote_bda[5]);
@@ -1382,7 +1382,7 @@ UINT16 BTM_GetNumAclLinks (void)
UINT16 btm_get_acl_disc_reason_code (void)
{
UINT8 res = btm_cb.acl_disc_reason;
BTM_TRACE_DEBUG ("btm_get_acl_disc_reason_code");
BTM_TRACE_DEBUG ("btm_get_acl_disc_reason_code\n");
return(res);
}
@@ -1400,7 +1400,7 @@ UINT16 btm_get_acl_disc_reason_code (void)
UINT16 BTM_GetHCIConnHandle (BD_ADDR remote_bda, tBT_TRANSPORT transport)
{
tACL_CONN *p;
BTM_TRACE_DEBUG ("BTM_GetHCIConnHandle");
BTM_TRACE_DEBUG ("BTM_GetHCIConnHandle\n");
p = btm_bda_to_acl(remote_bda, transport);
if (p != (tACL_CONN *)NULL)
{
@@ -1426,7 +1426,7 @@ UINT16 BTM_GetHCIConnHandle (BD_ADDR remote_bda, tBT_TRANSPORT transport)
void btm_process_clk_off_comp_evt (UINT16 hci_handle, UINT16 clock_offset)
{
UINT8 xx;
BTM_TRACE_DEBUG ("btm_process_clk_off_comp_evt");
BTM_TRACE_DEBUG ("btm_process_clk_off_comp_evt\n");
/* Look up the connection by handle and set the current mode */
if ((xx = btm_handle_to_acl_index(hci_handle)) < MAX_L2CAP_LINKS)
btm_cb.acl_db[xx].clock_offset = clock_offset;
@@ -1453,7 +1453,7 @@ void btm_acl_role_changed (UINT8 hci_status, BD_ADDR bd_addr, UINT8 new_role)
tBTM_SEC_DEV_REC *p_dev_rec;
tBTM_BL_ROLE_CHG_DATA evt;
BTM_TRACE_DEBUG ("btm_acl_role_changed");
BTM_TRACE_DEBUG ("btm_acl_role_changed\n");
/* Ignore any stray events */
if (p == NULL)
{
@@ -1521,7 +1521,7 @@ void btm_acl_role_changed (UINT8 hci_status, BD_ADDR bd_addr, UINT8 new_role)
(*btm_cb.p_bl_changed_cb)((tBTM_BL_EVENT_DATA *)&evt);
}
BTM_TRACE_DEBUG("Role Switch Event: new_role 0x%02x, HCI Status 0x%02x, rs_st:%d",
BTM_TRACE_DEBUG("Role Switch Event: new_role 0x%02x, HCI Status 0x%02x, rs_st:%d\n",
p_data->role, p_data->hci_status, p->switch_role_state);
#if BTM_DISC_DURING_RS == TRUE
@@ -1530,10 +1530,10 @@ void btm_acl_role_changed (UINT8 hci_status, BD_ADDR bd_addr, UINT8 new_role)
{
if (p_dev_rec->rs_disc_pending == BTM_SEC_DISC_PENDING)
{
BTM_TRACE_WARNING("btm_acl_role_changed -> Issuing delayed HCI_Disconnect!!!");
BTM_TRACE_WARNING("btm_acl_role_changed -> Issuing delayed HCI_Disconnect!!!\n");
btsnd_hcic_disconnect(p_dev_rec->hci_handle, HCI_ERR_PEER_USER);
}
BTM_TRACE_ERROR("tBTM_SEC_DEV:0x%x rs_disc_pending=%d",
BTM_TRACE_ERROR("tBTM_SEC_DEV:0x%x rs_disc_pending=%d\n",
(UINT32)p_dev_rec, p_dev_rec->rs_disc_pending);
p_dev_rec->rs_disc_pending = BTM_SEC_RS_NOT_PENDING; /* reset flag */
}
@@ -1555,7 +1555,7 @@ void btm_acl_role_changed (UINT8 hci_status, BD_ADDR bd_addr, UINT8 new_role)
UINT8 BTM_AllocateSCN(void)
{
UINT8 x;
BTM_TRACE_DEBUG ("BTM_AllocateSCN");
BTM_TRACE_DEBUG ("BTM_AllocateSCN\n");
// stack reserves scn 1 for HFP, HSP we still do the correct way
for (x = 1; x < BTM_MAX_SCN; x++)
@@ -1609,7 +1609,7 @@ BOOLEAN BTM_TryAllocateSCN(UINT8 scn)
*******************************************************************************/
BOOLEAN BTM_FreeSCN(UINT8 scn)
{
BTM_TRACE_DEBUG ("BTM_FreeSCN ");
BTM_TRACE_DEBUG ("BTM_FreeSCN \n");
if (scn <= BTM_MAX_SCN)
{
btm_cb.btm_scn[scn-1] = FALSE;
@@ -1633,7 +1633,7 @@ BOOLEAN BTM_FreeSCN(UINT8 scn)
tBTM_STATUS btm_set_packet_types (tACL_CONN *p, UINT16 pkt_types)
{
UINT16 temp_pkt_types;
BTM_TRACE_DEBUG ("btm_set_packet_types");
BTM_TRACE_DEBUG ("btm_set_packet_types\n");
/* Save in the ACL control blocks, types that we support */
temp_pkt_types = (pkt_types & BTM_ACL_SUPPORTED_PKTS_MASK &
btm_cb.btm_acl_pkt_types_supported);
@@ -1645,7 +1645,7 @@ tBTM_STATUS btm_set_packet_types (tACL_CONN *p, UINT16 pkt_types)
/* Exclude packet types not supported by the peer */
btm_acl_chk_peer_pkt_type_support (p, &temp_pkt_types);
BTM_TRACE_DEBUG ("SetPacketType Mask -> 0x%04x", temp_pkt_types);
BTM_TRACE_DEBUG ("SetPacketType Mask -> 0x%04x\n", temp_pkt_types);
if (!btsnd_hcic_change_conn_type (p->hci_handle, temp_pkt_types))
{
@@ -1670,7 +1670,7 @@ UINT16 btm_get_max_packet_size (BD_ADDR addr)
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
UINT16 pkt_types = 0;
UINT16 pkt_size = 0;
BTM_TRACE_DEBUG ("btm_get_max_packet_size");
BTM_TRACE_DEBUG ("btm_get_max_packet_size\n");
if (p != NULL)
{
pkt_types = p->pkt_types_mask;
@@ -1726,7 +1726,7 @@ tBTM_STATUS BTM_ReadRemoteVersion (BD_ADDR addr, UINT8 *lmp_version,
UINT16 *manufacturer, UINT16 *lmp_sub_version)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_ReadRemoteVersion");
BTM_TRACE_DEBUG ("BTM_ReadRemoteVersion\n");
if (p == NULL)
return(BTM_UNKNOWN_ADDR);
@@ -1752,7 +1752,7 @@ tBTM_STATUS BTM_ReadRemoteVersion (BD_ADDR addr, UINT8 *lmp_version,
UINT8 *BTM_ReadRemoteFeatures (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_ReadRemoteFeatures");
BTM_TRACE_DEBUG ("BTM_ReadRemoteFeatures\n");
if (p == NULL)
{
return(NULL);
@@ -1772,7 +1772,7 @@ UINT8 *BTM_ReadRemoteFeatures (BD_ADDR addr)
UINT8 *BTM_ReadRemoteExtendedFeatures (BD_ADDR addr, UINT8 page_number)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_ReadRemoteExtendedFeatures");
BTM_TRACE_DEBUG ("BTM_ReadRemoteExtendedFeatures\n");
if (p == NULL)
{
return(NULL);
@@ -1780,7 +1780,7 @@ UINT8 *BTM_ReadRemoteExtendedFeatures (BD_ADDR addr, UINT8 page_number)
if (page_number > HCI_EXT_FEATURES_PAGE_MAX)
{
BTM_TRACE_ERROR("Warning: BTM_ReadRemoteExtendedFeatures page %d unknown", page_number);
BTM_TRACE_ERROR("Warning: BTM_ReadRemoteExtendedFeatures page %d unknown\n", page_number);
return NULL;
}
@@ -1797,7 +1797,7 @@ UINT8 *BTM_ReadRemoteExtendedFeatures (BD_ADDR addr, UINT8 page_number)
UINT8 BTM_ReadNumberRemoteFeaturesPages (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_ReadNumberRemoteFeaturesPages");
BTM_TRACE_DEBUG ("BTM_ReadNumberRemoteFeaturesPages\n");
if (p == NULL)
{
return(0);
@@ -1816,7 +1816,7 @@ UINT8 BTM_ReadNumberRemoteFeaturesPages (BD_ADDR addr)
UINT8 *BTM_ReadAllRemoteFeatures (BD_ADDR addr)
{
tACL_CONN *p = btm_bda_to_acl(addr, BT_TRANSPORT_BR_EDR);
BTM_TRACE_DEBUG ("BTM_ReadAllRemoteFeatures");
BTM_TRACE_DEBUG ("BTM_ReadAllRemoteFeatures\n");
if (p == NULL)
{
return(NULL);
@@ -1838,7 +1838,7 @@ UINT8 *BTM_ReadAllRemoteFeatures (BD_ADDR addr)
tBTM_STATUS BTM_RegBusyLevelNotif (tBTM_BL_CHANGE_CB *p_cb, UINT8 *p_level,
tBTM_BL_EVENT_MASK evt_mask)
{
BTM_TRACE_DEBUG ("BTM_RegBusyLevelNotif");
BTM_TRACE_DEBUG ("BTM_RegBusyLevelNotif\n");
if (p_level)
*p_level = btm_cb.busy_level;
@@ -1867,7 +1867,7 @@ tBTM_STATUS BTM_SetQoS (BD_ADDR bd, FLOW_SPEC *p_flow, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p = &btm_cb.acl_db[0];
BTM_TRACE_API ("BTM_SetQoS: BdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_API ("BTM_SetQoS: BdAddr: %02x%02x%02x%02x%02x%02x\n",
bd[0], bd[1], bd[2],
bd[3], bd[4], bd[5]);
@@ -1910,7 +1910,7 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow)
{
tBTM_CMPL_CB *p_cb = btm_cb.devcb.p_qossu_cmpl_cb;
tBTM_QOS_SETUP_CMPL qossu;
BTM_TRACE_DEBUG ("btm_qos_setup_complete");
BTM_TRACE_DEBUG ("btm_qos_setup_complete\n");
btu_stop_timer (&btm_cb.devcb.qossu_timer);
btm_cb.devcb.p_qossu_cmpl_cb = NULL;
@@ -1929,7 +1929,7 @@ void btm_qos_setup_complete (UINT8 status, UINT16 handle, FLOW_SPEC *p_flow)
qossu.flow.latency = p_flow->latency;
qossu.flow.delay_variation = p_flow->delay_variation;
}
BTM_TRACE_DEBUG ("BTM: p_flow->delay_variation: 0x%02x",
BTM_TRACE_DEBUG ("BTM: p_flow->delay_variation: 0x%02x\n",
qossu.flow.delay_variation);
(*p_cb)(&qossu);
}
@@ -1955,7 +1955,7 @@ tBTM_STATUS BTM_ReadRSSI (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
tBT_DEVICE_TYPE dev_type;
tBLE_ADDR_TYPE addr_type;
#endif
BTM_TRACE_API ("BTM_ReadRSSI: RemBdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_API ("BTM_ReadRSSI: RemBdAddr: %02x%02x%02x%02x%02x%02x\n",
remote_bda[0], remote_bda[1], remote_bda[2],
remote_bda[3], remote_bda[4], remote_bda[5]);
@@ -2006,7 +2006,7 @@ tBTM_STATUS BTM_ReadLinkQuality (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb)
{
tACL_CONN *p;
BTM_TRACE_API ("BTM_ReadLinkQuality: RemBdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_API ("BTM_ReadLinkQuality: RemBdAddr: %02x%02x%02x%02x%02x%02x\n",
remote_bda[0], remote_bda[1], remote_bda[2],
remote_bda[3], remote_bda[4], remote_bda[5]);
@@ -2054,7 +2054,7 @@ tBTM_STATUS BTM_ReadTxPower (BD_ADDR remote_bda, tBT_TRANSPORT transport, tBTM_C
#define BTM_READ_RSSI_TYPE_CUR 0x00
#define BTM_READ_RSSI_TYPE_MAX 0X01
BTM_TRACE_API ("BTM_ReadTxPower: RemBdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_API ("BTM_ReadTxPower: RemBdAddr: %02x%02x%02x%02x%02x%02x\n",
remote_bda[0], remote_bda[1], remote_bda[2],
remote_bda[3], remote_bda[4], remote_bda[5]);
@@ -2111,7 +2111,7 @@ void btm_read_tx_power_complete (UINT8 *p, BOOLEAN is_ble)
UINT16 handle;
tACL_CONN *p_acl_cb = &btm_cb.acl_db[0];
UINT16 index;
BTM_TRACE_DEBUG ("btm_read_tx_power_complete");
BTM_TRACE_DEBUG ("btm_read_tx_power_complete\n");
btu_stop_timer (&btm_cb.devcb.tx_power_timer);
/* If there was a callback registered for read rssi, call it */
@@ -2147,7 +2147,7 @@ void btm_read_tx_power_complete (UINT8 *p, BOOLEAN is_ble)
memcpy(results.rem_bda, btm_cb.devcb.read_tx_pwr_addr, BD_ADDR_LEN);
}
#endif
BTM_TRACE_DEBUG ("BTM TX power Complete: tx_power %d, hci status 0x%02x",
BTM_TRACE_DEBUG ("BTM TX power Complete: tx_power %d, hci status 0x%02x\n",
results.tx_power, results.hci_status);
}
else
@@ -2174,7 +2174,7 @@ void btm_read_rssi_complete (UINT8 *p)
UINT16 handle;
tACL_CONN *p_acl_cb = &btm_cb.acl_db[0];
UINT16 index;
BTM_TRACE_DEBUG ("btm_read_rssi_complete");
BTM_TRACE_DEBUG ("btm_read_rssi_complete\n");
btu_stop_timer (&btm_cb.devcb.rssi_timer);
/* If there was a callback registered for read rssi, call it */
@@ -2191,7 +2191,7 @@ void btm_read_rssi_complete (UINT8 *p)
STREAM_TO_UINT16 (handle, p);
STREAM_TO_UINT8 (results.rssi, p);
BTM_TRACE_DEBUG ("BTM RSSI Complete: rssi %d, hci status 0x%02x",
BTM_TRACE_DEBUG ("BTM RSSI Complete: rssi %d, hci status 0x%02x\n",
results.rssi, results.hci_status);
/* Search through the list of active channels for the correct BD Addr */
@@ -2228,7 +2228,7 @@ void btm_read_link_quality_complete (UINT8 *p)
UINT16 handle;
tACL_CONN *p_acl_cb = &btm_cb.acl_db[0];
UINT16 index;
BTM_TRACE_DEBUG ("btm_read_link_quality_complete");
BTM_TRACE_DEBUG ("btm_read_link_quality_complete\n");
btu_stop_timer (&btm_cb.devcb.lnk_quality_timer);
/* If there was a callback registered for read rssi, call it */
@@ -2245,7 +2245,7 @@ void btm_read_link_quality_complete (UINT8 *p)
STREAM_TO_UINT16 (handle, p);
STREAM_TO_UINT8 (results.link_quality, p);
BTM_TRACE_DEBUG ("BTM Link Quality Complete: Link Quality %d, hci status 0x%02x",
BTM_TRACE_DEBUG ("BTM Link Quality Complete: Link Quality %d, hci status 0x%02x\n",
results.link_quality, results.hci_status);
/* Search through the list of active channels for the correct BD Addr */
@@ -2279,7 +2279,7 @@ tBTM_STATUS btm_remove_acl (BD_ADDR bd_addr, tBT_TRANSPORT transport)
UINT16 hci_handle = BTM_GetHCIConnHandle(bd_addr, transport);
tBTM_STATUS status = BTM_SUCCESS;
BTM_TRACE_DEBUG ("btm_remove_acl");
BTM_TRACE_DEBUG ("btm_remove_acl\n");
#if BTM_DISC_DURING_RS == TRUE
tBTM_SEC_DEV_REC *p_dev_rec = btm_find_dev (bd_addr);
@@ -2317,7 +2317,7 @@ tBTM_STATUS btm_remove_acl (BD_ADDR bd_addr, tBT_TRANSPORT transport)
*******************************************************************************/
UINT8 BTM_SetTraceLevel (UINT8 new_level)
{
BTM_TRACE_DEBUG ("BTM_SetTraceLevel");
BTM_TRACE_DEBUG ("BTM_SetTraceLevel\n");
if (new_level != 0xFF)
btm_cb.trace_level = new_level;
@@ -2339,7 +2339,7 @@ void btm_cont_rswitch (tACL_CONN *p, tBTM_SEC_DEV_REC *p_dev_rec,
UINT8 hci_status)
{
BOOLEAN sw_ok = TRUE;
BTM_TRACE_DEBUG ("btm_cont_rswitch");
BTM_TRACE_DEBUG ("btm_cont_rswitch\n");
/* Check to see if encryption needs to be turned off if pending
change of link key or role switch */
if (p->switch_role_state == BTM_ACL_SWKEY_STATE_MODE_CHANGE)
@@ -2397,7 +2397,7 @@ void btm_acl_resubmit_page (void)
BT_HDR *p_buf;
UINT8 *pp;
BD_ADDR bda;
BTM_TRACE_DEBUG ("btm_acl_resubmit_page");
BTM_TRACE_DEBUG ("btm_acl_resubmit_page\n");
/* If there were other page request schedule can start the next one */
if ((p_buf = (BT_HDR *)GKI_dequeue (&btm_cb.page_queue)) != NULL)
{
@@ -2428,7 +2428,7 @@ void btm_acl_resubmit_page (void)
void btm_acl_reset_paging (void)
{
BT_HDR *p;
BTM_TRACE_DEBUG ("btm_acl_reset_paging");
BTM_TRACE_DEBUG ("btm_acl_reset_paging\n");
/* If we sent reset we are definitely not paging any more */
while ((p = (BT_HDR *)GKI_dequeue(&btm_cb.page_queue)) != NULL)
GKI_freebuf (p);
@@ -2447,7 +2447,7 @@ void btm_acl_paging (BT_HDR *p, BD_ADDR bda)
{
tBTM_SEC_DEV_REC *p_dev_rec;
BTM_TRACE_DEBUG ("btm_acl_paging discing:%d, paging:%d BDA: %06x%06x",
BTM_TRACE_DEBUG ("btm_acl_paging discing:%d, paging:%d BDA: %06x%06x\n",
btm_cb.discing, btm_cb.paging,
(bda[0]<<16) + (bda[1]<<8) + bda[2], (bda[3]<<16) + (bda[4] << 8) + bda[5]);
if (btm_cb.discing)
@@ -2459,7 +2459,7 @@ void btm_acl_paging (BT_HDR *p, BD_ADDR bda)
{
if (!BTM_ACL_IS_CONNECTED (bda))
{
BTM_TRACE_DEBUG ("connecting_bda: %06x%06x",
BTM_TRACE_DEBUG ("connecting_bda: %06x%06x\n",
(btm_cb.connecting_bda[0]<<16) + (btm_cb.connecting_bda[1]<<8) +
btm_cb.connecting_bda[2],
(btm_cb.connecting_bda[3]<<16) + (btm_cb.connecting_bda[4] << 8) +
@@ -2504,7 +2504,7 @@ BOOLEAN btm_acl_notif_conn_collision (BD_ADDR bda)
/* Report possible collision to the upper layer. */
if (btm_cb.p_bl_changed_cb)
{
BTM_TRACE_DEBUG ("btm_acl_notif_conn_collision: RemBdAddr: %02x%02x%02x%02x%02x%02x",
BTM_TRACE_DEBUG ("btm_acl_notif_conn_collision: RemBdAddr: %02x%02x%02x%02x%02x%02x\n",
bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]);
evt_data.event = BTM_BL_COLLISION_EVT;
+11 -11
View File
@@ -67,7 +67,7 @@ BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
int i, j;
BOOLEAN found = FALSE;
BTM_TRACE_API("%s, link key type:%x", __FUNCTION__,key_type);
BTM_TRACE_API("%s, link key type:%x\n", __FUNCTION__,key_type);
p_dev_rec = btm_find_dev (bd_addr);
if (!p_dev_rec)
{
@@ -141,7 +141,7 @@ BOOLEAN BTM_SecAddDevice (BD_ADDR bd_addr, DEV_CLASS dev_class, BD_NAME bd_name,
if (link_key)
{
BTM_TRACE_EVENT ("BTM_SecAddDevice() BDA: %02x:%02x:%02x:%02x:%02x:%02x",
BTM_TRACE_EVENT ("BTM_SecAddDevice() BDA: %02x:%02x:%02x:%02x:%02x:%02x\n",
bd_addr[0], bd_addr[1], bd_addr[2],
bd_addr[3], bd_addr[4], bd_addr[5]);
p_dev_rec->sec_flags |= BTM_SEC_LINK_KEY_KNOWN;
@@ -190,7 +190,7 @@ BOOLEAN BTM_SecDeleteDevice (BD_ADDR bd_addr)
if (BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_LE) ||
BTM_IsAclConnectionUp(bd_addr, BT_TRANSPORT_BR_EDR))
{
BTM_TRACE_WARNING("%s FAILED: Cannot Delete when connection is active", __func__);
BTM_TRACE_WARNING("%s FAILED: Cannot Delete when connection is active\n", __func__);
return FALSE;
}
@@ -243,7 +243,7 @@ tBTM_SEC_DEV_REC *btm_sec_alloc_dev (BD_ADDR bd_addr)
DEV_CLASS old_cod;
int i_new_entry = BTM_SEC_MAX_DEVICE_RECORDS;
int i_old_entry = BTM_SEC_MAX_DEVICE_RECORDS;
BTM_TRACE_EVENT ("btm_sec_alloc_dev");
BTM_TRACE_EVENT ("btm_sec_alloc_dev\n");
for (i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++)
{
@@ -252,7 +252,7 @@ tBTM_SEC_DEV_REC *btm_sec_alloc_dev (BD_ADDR bd_addr)
(!memcmp (btm_cb.sec_dev_rec[i].bd_addr, bd_addr, BD_ADDR_LEN)))
{
i_old_entry = i;
BTM_TRACE_EVENT ("btm_sec_alloc_dev old device found");
BTM_TRACE_EVENT ("btm_sec_alloc_dev old device found\n");
break;
}
}
@@ -284,7 +284,7 @@ tBTM_SEC_DEV_REC *btm_sec_alloc_dev (BD_ADDR bd_addr)
/* Retain the old COD for device */
if(i_old_entry != BTM_SEC_MAX_DEVICE_RECORDS) {
BTM_TRACE_EVENT ("btm_sec_alloc_dev restoring cod ");
BTM_TRACE_EVENT ("btm_sec_alloc_dev restoring cod \n");
memcpy (p_dev_rec->dev_class, old_cod, DEV_CLASS_LEN);
}
@@ -377,7 +377,7 @@ BOOLEAN btm_dev_support_switch (BD_ADDR bd_addr)
{
if (HCI_SWITCH_SUPPORTED(p_dev_rec->features[HCI_EXT_FEATURES_PAGE_0]))
{
BTM_TRACE_DEBUG("btm_dev_support_switch return TRUE (feature found)");
BTM_TRACE_DEBUG("btm_dev_support_switch return TRUE (feature found)\n");
return (TRUE);
}
@@ -394,12 +394,12 @@ BOOLEAN btm_dev_support_switch (BD_ADDR bd_addr)
/* If we don't know peer's capabilities, assume it supports Role-switch */
if (feature_empty)
{
BTM_TRACE_DEBUG("btm_dev_support_switch return TRUE (feature empty)");
BTM_TRACE_DEBUG("btm_dev_support_switch return TRUE (feature empty)\n");
return (TRUE);
}
}
BTM_TRACE_DEBUG("btm_dev_support_switch return FALSE");
BTM_TRACE_DEBUG("btm_dev_support_switch return FALSE\n");
return(FALSE);
}
@@ -484,7 +484,7 @@ void btm_consolidate_dev(tBTM_SEC_DEV_REC *p_target_rec)
tBTM_SEC_DEV_REC temp_rec = *p_target_rec;
BD_ADDR dummy_bda = {0};
BTM_TRACE_DEBUG("%s", __func__);
BTM_TRACE_DEBUG("%s\n", __func__);
for (uint8_t i = 0; i < BTM_SEC_MAX_DEVICE_RECORDS; i++, p_dev_rec++)
{
@@ -539,7 +539,7 @@ void btm_consolidate_dev(tBTM_SEC_DEV_REC *p_target_rec)
tBTM_SEC_DEV_REC *btm_find_or_alloc_dev (BD_ADDR bd_addr)
{
tBTM_SEC_DEV_REC *p_dev_rec;
BTM_TRACE_EVENT ("btm_find_or_alloc_dev");
BTM_TRACE_EVENT ("btm_find_or_alloc_dev\n");
if ((p_dev_rec = btm_find_dev (bd_addr)) == NULL)
{
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -44,7 +44,7 @@
#endif
#endif
extern fixed_queue_t *btif_msg_queue;
// extern fixed_queue_t *btif_msg_queue;
// Communication queue from bta thread to bt_workqueue.
fixed_queue_t *btu_bta_msg_queue;
+19 -19
View File
@@ -299,7 +299,7 @@ UINT32 SDP_CreateRecord (void)
p_db->record[p_db->num_records].record_handle = handle;
p_db->num_records++;
SDP_TRACE_DEBUG("SDP_CreateRecord ok, num_records:%d", p_db->num_records);
SDP_TRACE_DEBUG("SDP_CreateRecord ok, num_records:%d\n", p_db->num_records);
/* Add the first attribute (the handle) automatically */
UINT32_TO_BE_FIELD (buf, handle);
SDP_AddAttribute (handle, ATTR_ID_SERVICE_RECORD_HDL, UINT_DESC_TYPE,
@@ -307,7 +307,7 @@ UINT32 SDP_CreateRecord (void)
return (p_db->record[p_db->num_records - 1].record_handle);
}
else SDP_TRACE_ERROR("SDP_CreateRecord fail, exceed maximum records:%d", SDP_MAX_RECORDS);
else SDP_TRACE_ERROR("SDP_CreateRecord fail, exceed maximum records:%d\n", SDP_MAX_RECORDS);
#endif
return (0);
}
@@ -361,7 +361,7 @@ BOOLEAN SDP_DeleteRecord (UINT32 handle)
sdp_cb.server_db.num_records--;
SDP_TRACE_DEBUG("SDP_DeleteRecord ok, num_records:%d", sdp_cb.server_db.num_records);
SDP_TRACE_DEBUG("SDP_DeleteRecord ok, num_records:%d\n", sdp_cb.server_db.num_records);
/* if we're deleting the primary DI record, clear the */
/* value in the control block */
if( sdp_cb.server_db.di_primary_handle == handle )
@@ -417,17 +417,17 @@ BOOLEAN SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type,
{
sprintf((char *)&num_array[i*2],"%02X",(UINT8)(p_val[i]));
}
SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s",
SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s\n",
handle,attr_id,attr_type,attr_len,p_val,num_array);
}
else if (attr_type == BOOLEAN_DESC_TYPE)
{
SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%d",
SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%d\n",
handle,attr_id,attr_type,attr_len,p_val,*p_val);
}
else
{
SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s",
SDP_TRACE_DEBUG("SDP_AddAttribute: handle:%X, id:%04X, type:%d, len:%d, p_val:%p, *p_val:%s\n",
handle,attr_id,attr_type,attr_len,p_val,p_val);
}
}
@@ -475,7 +475,7 @@ BOOLEAN SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type,
/* do truncate only for text string type descriptor */
if (attr_type == TEXT_STR_DESC_TYPE)
{
SDP_TRACE_WARNING("SDP_AddAttribute: attr_len:%d too long. truncate to (%d)",
SDP_TRACE_WARNING("SDP_AddAttribute: attr_len:%d too long. truncate to (%d)\n",
attr_len, SDP_MAX_PAD_LEN - p_rec->free_pad_ptr );
attr_len = SDP_MAX_PAD_LEN - p_rec->free_pad_ptr;
@@ -496,7 +496,7 @@ BOOLEAN SDP_AddAttribute (UINT32 handle, UINT16 attr_id, UINT8 attr_type,
else if ((attr_len == 0 && p_attr->len != 0) || /* if truncate to 0 length, simply don't add */
p_val == 0)
{
SDP_TRACE_ERROR("SDP_AddAttribute fail, length exceed maximum: ID %d: attr_len:%d ",
SDP_TRACE_ERROR("SDP_AddAttribute fail, length exceed maximum: ID %d: attr_len:%d \n",
attr_id, attr_len );
p_attr->id = p_attr->type = p_attr->len = 0;
return (FALSE);
@@ -536,7 +536,7 @@ BOOLEAN SDP_AddSequence (UINT32 handle, UINT16 attr_id, UINT16 num_elem,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddSequence cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddSequence cannot get a buffer!\n");
return (FALSE);
}
p = p_buff;
@@ -577,12 +577,12 @@ BOOLEAN SDP_AddSequence (UINT32 handle, UINT16 attr_id, UINT16 num_elem,
if(p_head == p_buff)
{
/* the first element exceed the max length */
SDP_TRACE_ERROR ("SDP_AddSequence - too long(attribute is not added)!!");
SDP_TRACE_ERROR ("SDP_AddSequence - too long(attribute is not added)!!\n");
GKI_freebuf(p_buff);
return FALSE;
}
else
SDP_TRACE_ERROR ("SDP_AddSequence - too long, add %d elements of %d", xx, num_elem);
SDP_TRACE_ERROR ("SDP_AddSequence - too long, add %d elements of %d\n", xx, num_elem);
break;
}
}
@@ -619,7 +619,7 @@ BOOLEAN SDP_AddUuidSequence (UINT32 handle, UINT16 attr_id, UINT16 num_uuids,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddUuidSequence cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddUuidSequence cannot get a buffer!\n");
return (FALSE);
}
p = p_buff;
@@ -632,7 +632,7 @@ BOOLEAN SDP_AddUuidSequence (UINT32 handle, UINT16 attr_id, UINT16 num_uuids,
if((p - p_buff) > max_len)
{
SDP_TRACE_WARNING ("SDP_AddUuidSequence - too long, add %d uuids of %d", xx, num_uuids);
SDP_TRACE_WARNING ("SDP_AddUuidSequence - too long, add %d uuids of %d\n", xx, num_uuids);
break;
}
}
@@ -667,7 +667,7 @@ BOOLEAN SDP_AddProtocolList (UINT32 handle, UINT16 num_elem,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddProtocolList cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddProtocolList cannot get a buffer!\n");
return (FALSE);
}
@@ -706,7 +706,7 @@ BOOLEAN SDP_AddAdditionProtoLists (UINT32 handle, UINT16 num_elem,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddAdditionProtoLists cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddAdditionProtoLists cannot get a buffer!\n");
return (FALSE);
}
p = p_buff;
@@ -755,7 +755,7 @@ BOOLEAN SDP_AddProfileDescriptorList (UINT32 handle, UINT16 profile_uuid,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddProfileDescriptorList cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddProfileDescriptorList cannot get a buffer!\n");
return (FALSE);
}
p = p_buff+2;
@@ -804,7 +804,7 @@ BOOLEAN SDP_AddLanguageBaseAttrIDList (UINT32 handle, UINT16 lang,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddLanguageBaseAttrIDList cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddLanguageBaseAttrIDList cannot get a buffer!\n");
return (FALSE);
}
p = p_buff;
@@ -853,7 +853,7 @@ BOOLEAN SDP_AddServiceClassIdList (UINT32 handle, UINT16 num_services,
if ((p_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN * 2)) == NULL)
{
SDP_TRACE_ERROR("SDP_AddServiceClassIdList cannot get a buffer!");
SDP_TRACE_ERROR("SDP_AddServiceClassIdList cannot get a buffer!\n");
return (FALSE);
}
p = p_buff;
@@ -899,7 +899,7 @@ BOOLEAN SDP_DeleteAttribute (UINT32 handle, UINT16 attr_id)
{
tSDP_ATTRIBUTE *p_attr = &p_rec->attribute[0];
SDP_TRACE_API("Deleting attr_id 0x%04x for handle 0x%x", attr_id, handle);
SDP_TRACE_API("Deleting attr_id 0x%04x for handle 0x%x\n", attr_id, handle);
/* Found it. Now, find the attribute */
for (xx = 0; xx < p_rec->num_attributes; xx++, p_attr++)
{
@@ -171,7 +171,7 @@ static void sdp_snd_service_search_req(tCONN_CB *p_ccb, UINT8 cont_len, UINT8 *
p_cmd->len = (UINT16)(p - p_start);
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("sdp_snd_service_search_req cont_len :%d disc_state:%d",cont_len, p_ccb->disc_state);
SDP_TRACE_WARNING("sdp_snd_service_search_req cont_len :%d disc_state:%d\n",cont_len, p_ccb->disc_state);
#endif
@@ -228,7 +228,7 @@ void sdp_disc_server_rsp (tCONN_CB *p_ccb, BT_HDR *p_msg)
BOOLEAN invalid_pdu = TRUE;
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("sdp_disc_server_rsp disc_state:%d", p_ccb->disc_state);
SDP_TRACE_WARNING("sdp_disc_server_rsp disc_state:%d\n", p_ccb->disc_state);
#endif
/* stop inactivity timer when we receive a response */
@@ -270,7 +270,7 @@ void sdp_disc_server_rsp (tCONN_CB *p_ccb, BT_HDR *p_msg)
if (invalid_pdu)
{
SDP_TRACE_WARNING ("SDP - Unexp. PDU: %d in state: %d", rsp_pdu, p_ccb->disc_state);
SDP_TRACE_WARNING ("SDP - Unexp. PDU: %d in state: %d\n", rsp_pdu, p_ccb->disc_state);
sdp_disconnect (p_ccb, SDP_GENERIC_ERROR);
}
}
@@ -300,7 +300,7 @@ static void process_service_search_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
p_ccb->num_handles += cur_handles;
if (p_ccb->num_handles == 0)
{
SDP_TRACE_WARNING ("SDP - Rcvd ServiceSearchRsp, no matches");
SDP_TRACE_WARNING ("SDP - Rcvd ServiceSearchRsp, no matches\n");
sdp_disconnect (p_ccb, SDP_NO_RECS_MATCH);
return;
}
@@ -359,9 +359,9 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)
for (i = 0; i < p_ccb->list_len; i++)
{
sprintf((char *)&num_array[i*2],"%02X",(UINT8)(p_ccb->rsp_list[i]));
sprintf((char *)&num_array[i*2],"%02X\n",(UINT8)(p_ccb->rsp_list[i]));
}
SDP_TRACE_WARNING("result :%s",num_array);
SDP_TRACE_WARNING("result :%s\n",num_array);
#endif
if(p_ccb->p_db->raw_data)
@@ -380,7 +380,7 @@ static void sdp_copy_raw_data (tCONN_CB *p_ccb, BOOLEAN offset)
cpy_len = list_len;
}
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("list_len :%d cpy_len:%d raw_size:%d raw_used:%d",
SDP_TRACE_WARNING("list_len :%d cpy_len:%d raw_size:%d raw_used:%d\n",
list_len, cpy_len, p_ccb->p_db->raw_size, p_ccb->p_db->raw_used);
#endif
memcpy (&p_ccb->p_db->raw_data[p_ccb->p_db->raw_used], p, cpy_len);
@@ -406,14 +406,14 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
BOOLEAN cont_request_needed = FALSE;
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("process_service_attr_rsp raw inc:%d",
SDP_TRACE_WARNING("process_service_attr_rsp raw inc:%d\n",
SDP_RAW_DATA_INCLUDED);
#endif
/* If p_reply is NULL, we were called after the records handles were read */
if (p_reply)
{
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("ID & len: 0x%02x-%02x-%02x-%02x",
SDP_TRACE_WARNING("ID & len: 0x%02x-%02x-%02x-%02x\n",
p_reply[0], p_reply[1], p_reply[2], p_reply[3]);
#endif
/* Skip transaction ID and length */
@@ -421,7 +421,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
BE_STREAM_TO_UINT16 (list_byte_count, p_reply);
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("list_byte_count:%d", list_byte_count);
SDP_TRACE_WARNING("list_byte_count:%d\n", list_byte_count);
#endif
/* Copy the response to the scratchpad. First, a safety check on the length */
@@ -432,7 +432,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
}
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("list_len: %d, list_byte_count: %d",
SDP_TRACE_WARNING("list_len: %d, list_byte_count: %d\n",
p_ccb->list_len, list_byte_count);
#endif
if (p_ccb->rsp_list == NULL)
@@ -440,7 +440,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
p_ccb->rsp_list = (UINT8 *)GKI_getbuf (SDP_MAX_LIST_BYTE_COUNT);
if (p_ccb->rsp_list == NULL)
{
SDP_TRACE_ERROR ("SDP - no gki buf to save rsp");
SDP_TRACE_ERROR ("SDP - no gki buf to save rsp\n");
sdp_disconnect (p_ccb, SDP_NO_RESOURCES);
return;
}
@@ -449,10 +449,10 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
p_ccb->list_len += list_byte_count;
p_reply += list_byte_count;
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("list_len: %d(attr_rsp)", p_ccb->list_len);
SDP_TRACE_WARNING("list_len: %d(attr_rsp)\n", p_ccb->list_len);
/* Check if we need to request a continuation */
SDP_TRACE_WARNING("*p_reply:%d(%d)", *p_reply, SDP_MAX_CONTINUATION_LEN);
SDP_TRACE_WARNING("*p_reply:%d(%d)\n", *p_reply, SDP_MAX_CONTINUATION_LEN);
#endif
if (*p_reply)
{
@@ -467,7 +467,7 @@ static void process_service_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
{
#if (SDP_RAW_DATA_INCLUDED == TRUE)
SDP_TRACE_WARNING("process_service_attr_rsp");
SDP_TRACE_WARNING("process_service_attr_rsp\n");
sdp_copy_raw_data (p_ccb, FALSE);
#endif
@@ -566,13 +566,13 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
BOOLEAN cont_request_needed = FALSE;
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("process_service_search_attr_rsp");
SDP_TRACE_WARNING("process_service_search_attr_rsp\n");
#endif
/* If p_reply is NULL, we were called for the initial read */
if (p_reply)
{
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("ID & len: 0x%02x-%02x-%02x-%02x",
SDP_TRACE_WARNING("ID & len: 0x%02x-%02x-%02x-%02x\n",
p_reply[0], p_reply[1], p_reply[2], p_reply[3]);
#endif
/* Skip transaction ID and length */
@@ -580,7 +580,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
BE_STREAM_TO_UINT16 (lists_byte_count, p_reply);
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("lists_byte_count:%d", lists_byte_count);
SDP_TRACE_WARNING("lists_byte_count:%d\n", lists_byte_count);
#endif
/* Copy the response to the scratchpad. First, a safety check on the length */
@@ -591,7 +591,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
}
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("list_len: %d, list_byte_count: %d",
SDP_TRACE_WARNING("list_len: %d, list_byte_count: %d\n",
p_ccb->list_len, lists_byte_count);
#endif
if (p_ccb->rsp_list == NULL)
@@ -599,7 +599,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
p_ccb->rsp_list = (UINT8 *)GKI_getbuf (SDP_MAX_LIST_BYTE_COUNT);
if (p_ccb->rsp_list == NULL)
{
SDP_TRACE_ERROR ("SDP - no gki buf to save rsp");
SDP_TRACE_ERROR ("SDP - no gki buf to save rsp\n");
sdp_disconnect (p_ccb, SDP_NO_RESOURCES);
return;
}
@@ -608,10 +608,10 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
p_ccb->list_len += lists_byte_count;
p_reply += lists_byte_count;
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("list_len: %d(search_attr_rsp)", p_ccb->list_len);
SDP_TRACE_WARNING("list_len: %d(search_attr_rsp)\n", p_ccb->list_len);
/* Check if we need to request a continuation */
SDP_TRACE_WARNING("*p_reply:%d(%d)", *p_reply, SDP_MAX_CONTINUATION_LEN);
SDP_TRACE_WARNING("*p_reply:%d(%d)\n", *p_reply, SDP_MAX_CONTINUATION_LEN);
#endif
if (*p_reply)
{
@@ -626,7 +626,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
}
#if (SDP_DEBUG_RAW == TRUE)
SDP_TRACE_WARNING("cont_request_needed:%d", cont_request_needed);
SDP_TRACE_WARNING("cont_request_needed:%d\n", cont_request_needed);
#endif
/* If continuation request (or first time request) */
if ((cont_request_needed) || (!p_reply))
@@ -699,7 +699,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
/*******************************************************************/
#if (SDP_RAW_DATA_INCLUDED == TRUE)
SDP_TRACE_WARNING("process_service_search_attr_rsp");
SDP_TRACE_WARNING("process_service_search_attr_rsp\n");
sdp_copy_raw_data (p_ccb, TRUE);
#endif
@@ -710,7 +710,7 @@ static void process_service_search_attr_rsp (tCONN_CB *p_ccb, UINT8 *p_reply)
if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE)
{
SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp", type);
SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp\n", type);
return;
}
p = sdpu_get_len_from_type (p, type, &seq_len);
@@ -758,14 +758,14 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
if ((type >> 3) != DATA_ELE_SEQ_DESC_TYPE)
{
SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp", type);
SDP_TRACE_WARNING ("SDP - Wrong type: 0x%02x in attr_rsp\n", type);
return (NULL);
}
p = sdpu_get_len_from_type (p, type, &seq_len);
if ((p + seq_len) > p_msg_end)
{
SDP_TRACE_WARNING ("SDP - Bad len in attr_rsp %d", seq_len);
SDP_TRACE_WARNING ("SDP - Bad len in attr_rsp %d\n", seq_len);
return (NULL);
}
@@ -773,7 +773,7 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
p_rec = add_record (p_ccb->p_db, p_ccb->device_address);
if (!p_rec)
{
SDP_TRACE_WARNING ("SDP - DB full add_record");
SDP_TRACE_WARNING ("SDP - DB full add_record\n");
return (NULL);
}
@@ -786,7 +786,7 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
p = sdpu_get_len_from_type (p, type, &attr_len);
if (((type >> 3) != UINT_DESC_TYPE) || (attr_len != 2))
{
SDP_TRACE_WARNING ("SDP - Bad type: 0x%02x or len: %d in attr_rsp", type, attr_len);
SDP_TRACE_WARNING ("SDP - Bad type: 0x%02x or len: %d in attr_rsp\n", type, attr_len);
return (NULL);
}
BE_STREAM_TO_UINT16 (attr_id, p);
@@ -796,7 +796,7 @@ static UINT8 *save_attr_seq (tCONN_CB *p_ccb, UINT8 *p, UINT8 *p_msg_end)
if (!p)
{
SDP_TRACE_WARNING ("SDP - DB full add_attr");
SDP_TRACE_WARNING ("SDP - DB full add_attr\n");
return (NULL);
}
}
@@ -916,7 +916,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
/* SDP_TRACE_DEBUG ("SDP - attr nest level:%d(list)", nest_level); */
if (nest_level >= MAX_NEST_LEVELS)
{
SDP_TRACE_ERROR ("SDP - attr nesting too deep");
SDP_TRACE_ERROR ("SDP - attr nesting too deep\n");
return (p_end);
}
@@ -993,7 +993,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
}
break;
default:
SDP_TRACE_WARNING ("SDP - bad len in UUID attr: %d", attr_len);
SDP_TRACE_WARNING ("SDP - bad len in UUID attr: %d\n", attr_len);
return (p + attr_len);
}
break;
@@ -1009,7 +1009,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
/* SDP_TRACE_DEBUG ("SDP - attr nest level:%d", nest_level); */
if (nest_level >= MAX_NEST_LEVELS)
{
SDP_TRACE_ERROR ("SDP - attr nesting too deep");
SDP_TRACE_ERROR ("SDP - attr nesting too deep\n");
return (p_end);
}
if(is_additional_list != 0 || attr_id == ATTR_ID_ADDITION_PROTO_DESC_LISTS)
@@ -1038,7 +1038,7 @@ static UINT8 *add_attr (UINT8 *p, tSDP_DISCOVERY_DB *p_db, tSDP_DISC_REC *p_rec,
p_attr->attr_value.v.u8 = *p++;
break;
default:
SDP_TRACE_WARNING ("SDP - bad len in boolean attr: %d", attr_len);
SDP_TRACE_WARNING ("SDP - bad len in boolean attr: %d\n", attr_len);
return (p + attr_len);
}
break;
+28 -30
View File
@@ -97,7 +97,7 @@ void sdp_init (void)
if (!BTM_SetSecurityLevel (FALSE, SDP_SERVICE_NAME, BTM_SEC_SERVICE_SDP_SERVER,
SDP_SECURITY_LEVEL, SDP_PSM, 0, 0))
{
SDP_TRACE_ERROR ("Security Registration Server failed");
SDP_TRACE_ERROR ("Security Registration Server failed\n");
return;
}
#endif
@@ -107,7 +107,7 @@ void sdp_init (void)
if (!BTM_SetSecurityLevel (TRUE, SDP_SERVICE_NAME, BTM_SEC_SERVICE_SDP_SERVER,
SDP_SECURITY_LEVEL, SDP_PSM, 0, 0))
{
SDP_TRACE_ERROR ("Security Registration for Client failed");
SDP_TRACE_ERROR ("Security Registration for Client failed\n");
return;
}
#endif
@@ -133,7 +133,7 @@ void sdp_init (void)
/* Now, register with L2CAP */
if (!L2CA_Register (SDP_PSM, &sdp_cb.reg_info))
{
SDP_TRACE_ERROR ("SDP Registration failed");
SDP_TRACE_ERROR ("SDP Registration failed\n");
}
}
@@ -193,7 +193,7 @@ static void sdp_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
if (cfg.fcr_present)
{
SDP_TRACE_DEBUG("sdp_connect_ind: mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u",
SDP_TRACE_DEBUG("sdp_connect_ind: mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u\n",
cfg.fcr.mode, cfg.fcr.tx_win_sz, cfg.fcr.max_transmit,
cfg.fcr.rtrans_tout,cfg.fcr.mon_tout, cfg.fcr.mps);
}
@@ -208,7 +208,7 @@ static void sdp_connect_ind (BD_ADDR bd_addr, UINT16 l2cap_cid, UINT16 psm, UIN
}
}
SDP_TRACE_EVENT ("SDP - Rcvd L2CAP conn ind, sent config req, CID 0x%x", p_ccb->connection_id);
SDP_TRACE_EVENT ("SDP - Rcvd L2CAP conn ind, sent config req, CID 0x%x\n", p_ccb->connection_id);
#else /* No server */
/* Reject the connection */
L2CA_ConnectRsp (bd_addr, l2cap_id, l2cap_cid, L2CAP_CONN_NO_PSM, 0);
@@ -235,7 +235,7 @@ static void sdp_connect_cfm (UINT16 l2cap_cid, UINT16 result)
/* Find CCB based on CID */
if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
{
SDP_TRACE_WARNING ("SDP - Rcvd conn cnf for unknown CID 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd conn cnf for unknown CID 0x%x\n", l2cap_cid);
return;
}
@@ -249,7 +249,7 @@ static void sdp_connect_cfm (UINT16 l2cap_cid, UINT16 result)
if (cfg.fcr_present)
{
SDP_TRACE_DEBUG("sdp_connect_cfm: mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u",
SDP_TRACE_DEBUG("sdp_connect_cfm: mode %u, txwinsz %u, max_trans %u, rtrans_tout %u, mon_tout %u, mps %u\n",
cfg.fcr.mode, cfg.fcr.tx_win_sz, cfg.fcr.max_transmit,
cfg.fcr.rtrans_tout,cfg.fcr.mon_tout, cfg.fcr.mps);
}
@@ -263,11 +263,11 @@ static void sdp_connect_cfm (UINT16 l2cap_cid, UINT16 result)
L2CA_ConfigReq (l2cap_cid, &cfg);
}
SDP_TRACE_EVENT ("SDP - got conn cnf, sent cfg req, CID: 0x%x", p_ccb->connection_id);
SDP_TRACE_EVENT ("SDP - got conn cnf, sent cfg req, CID: 0x%x\n", p_ccb->connection_id);
}
else
{
SDP_TRACE_WARNING ("SDP - Rcvd conn cnf with error: 0x%x CID 0x%x", result, p_ccb->connection_id);
SDP_TRACE_WARNING ("SDP - Rcvd conn cnf with error: 0x%x CID 0x%x\n", result, p_ccb->connection_id);
/* Tell the user if he has a callback */
if (p_ccb->p_cb || p_ccb->p_cb2)
@@ -312,7 +312,7 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
/* Find CCB based on CID */
if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
{
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x\n", l2cap_cid);
return;
}
@@ -346,7 +346,7 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
p_cfg->fcr.tx_win_sz = sdp_cb.l2cap_my_cfg.fcr.tx_win_sz;
p_cfg->result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
SDP_TRACE_DEBUG("sdp_config_ind(CONFIG) -> Please try again with SMALLER TX WINDOW");
SDP_TRACE_DEBUG("sdp_config_ind(CONFIG) -> Please try again with SMALLER TX WINDOW\n");
}
/* Reject if locally we want basic and they don't */
@@ -355,12 +355,12 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
/* Ask for a new setup */
p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
p_cfg->result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
SDP_TRACE_DEBUG("sdp_config_ind(CONFIG) -> Please try again with BASIC mode");
SDP_TRACE_DEBUG("sdp_config_ind(CONFIG) -> Please try again with BASIC mode\n");
}
/* Remain in configure state and give the peer our desired configuration */
if (p_cfg->result != L2CAP_CFG_OK)
{
SDP_TRACE_WARNING ("SDP - Rcvd cfg ind, Unacceptable Parameters sent cfg cfm, CID: 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd cfg ind, Unacceptable Parameters sent cfg cfm, CID: 0x%x\n", l2cap_cid);
L2CA_ConfigRsp (l2cap_cid, p_cfg);
return;
}
@@ -371,7 +371,7 @@ static void sdp_config_ind (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
L2CA_ConfigRsp (l2cap_cid, p_cfg);
SDP_TRACE_EVENT ("SDP - Rcvd cfg ind, sent cfg cfm, CID: 0x%x", l2cap_cid);
SDP_TRACE_EVENT ("SDP - Rcvd cfg ind, sent cfg cfm, CID: 0x%x\n", l2cap_cid);
p_ccb->con_flags |= SDP_FLAGS_HIS_CFG_DONE;
@@ -403,12 +403,12 @@ static void sdp_config_cfm (UINT16 l2cap_cid, tL2CAP_CFG_INFO *p_cfg)
{
tCONN_CB *p_ccb;
SDP_TRACE_EVENT ("SDP - Rcvd cfg cfm, CID: 0x%x Result: %d", l2cap_cid, p_cfg->result);
SDP_TRACE_EVENT ("SDP - Rcvd cfg cfm, CID: 0x%x Result: %d\n", l2cap_cid, p_cfg->result);
/* Find CCB based on CID */
if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
{
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP cfg ind, unknown CID: 0x%x\n", l2cap_cid);
return;
}
@@ -464,14 +464,14 @@ static void sdp_disconnect_ind (UINT16 l2cap_cid, BOOLEAN ack_needed)
/* Find CCB based on CID */
if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
{
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP disc, unknown CID: 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP disc, unknown CID: 0x%x\n", l2cap_cid);
return;
}
if (ack_needed)
L2CA_DisconnectRsp (l2cap_cid);
SDP_TRACE_EVENT ("SDP - Rcvd L2CAP disc, CID: 0x%x", l2cap_cid);
SDP_TRACE_EVENT ("SDP - Rcvd L2CAP disc, CID: 0x%x\n", l2cap_cid);
#if SDP_CLIENT_ENABLED == TRUE
/* Tell the user if he has a callback */
if (p_ccb->p_cb)
@@ -516,13 +516,13 @@ static void sdp_data_ind (UINT16 l2cap_cid, BT_HDR *p_msg)
}
else
{
SDP_TRACE_WARNING ("SDP - Ignored L2CAP data while in state: %d, CID: 0x%x",
SDP_TRACE_WARNING ("SDP - Ignored L2CAP data while in state: %d, CID: 0x%x\n",
p_ccb->con_state, l2cap_cid);
}
}
else
{
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP data, unknown CID: 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP data, unknown CID: 0x%x\n", l2cap_cid);
}
GKI_freebuf (p_msg);
@@ -548,11 +548,11 @@ tCONN_CB* sdp_conn_originate (UINT8 *p_bd_addr)
/* Allocate a new CCB. Return if none available. */
if ((p_ccb = sdpu_allocate_ccb()) == NULL)
{
SDP_TRACE_WARNING ("SDP - no spare CCB for orig");
SDP_TRACE_WARNING ("SDP - no spare CCB for orig\n");
return (NULL);
}
SDP_TRACE_EVENT ("SDP - Originate started");
SDP_TRACE_EVENT ("SDP - Originate started\n");
/* We are the originator of this connection */
p_ccb->con_flags |= SDP_FLAGS_IS_ORIG;
@@ -574,7 +574,7 @@ tCONN_CB* sdp_conn_originate (UINT8 *p_bd_addr)
}
else
{
SDP_TRACE_WARNING ("SDP - Originate failed");
SDP_TRACE_WARNING ("SDP - Originate failed\n");
sdpu_release_ccb (p_ccb);
return (NULL);
}
@@ -592,7 +592,6 @@ tCONN_CB* sdp_conn_originate (UINT8 *p_bd_addr)
void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason)
{
#if (defined(SDP_BROWSE_PLUS) && SDP_BROWSE_PLUS == TRUE)
/* If we are browsing for multiple UUIDs ... */
if ((p_ccb->con_state == SDP_STATE_CONNECTED)
&& (p_ccb->con_flags & SDP_FLAGS_IS_ORIG)
@@ -618,7 +617,7 @@ void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason)
p_ccb->cur_handle = 0;
SDP_TRACE_EVENT ("SDP - looking for for more, CID: 0x%x",
SDP_TRACE_EVENT ("SDP - looking for for more, CID: 0x%x\n",
p_ccb->connection_id);
sdp_disc_connected (p_ccb);
@@ -631,7 +630,7 @@ void sdp_disconnect (tCONN_CB*p_ccb, UINT16 reason)
#endif
SDP_TRACE_EVENT ("SDP - disconnect CID: 0x%x", p_ccb->connection_id);
SDP_TRACE_EVENT ("SDP - disconnect CID: 0x%x\n", p_ccb->connection_id);
/* Check if we have a connection ID */
if (p_ccb->connection_id != 0)
@@ -672,12 +671,11 @@ static void sdp_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
/* Find CCB based on CID */
if ((p_ccb = sdpu_find_ccb_by_cid (l2cap_cid)) == NULL)
{
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP disc cfm, unknown CID: 0x%x", l2cap_cid);
SDP_TRACE_WARNING ("SDP - Rcvd L2CAP disc cfm, unknown CID: 0x%x\n", l2cap_cid);
return;
}
SDP_TRACE_EVENT ("SDP - Rcvd L2CAP disc cfm, CID: 0x%x", l2cap_cid);
SDP_TRACE_EVENT ("SDP - Rcvd L2CAP disc cfm, CID: 0x%x, rsn %d\n", l2cap_cid, p_ccb->disconnect_reason);
/* Tell the user if he has a callback */
if (p_ccb->p_cb)
(*p_ccb->p_cb) (p_ccb->disconnect_reason);
@@ -702,7 +700,7 @@ static void sdp_disconnect_cfm (UINT16 l2cap_cid, UINT16 result)
*******************************************************************************/
void sdp_conn_timeout (tCONN_CB*p_ccb)
{
SDP_TRACE_EVENT ("SDP - CCB timeout in state: %d CID: 0x%x",
SDP_TRACE_EVENT ("SDP - CCB timeout in state: %d CID: 0x%x\n",
p_ccb->con_state, p_ccb->connection_id);
L2CA_DisconnectReq (p_ccb->connection_id);
+10 -10
View File
@@ -152,7 +152,7 @@ void sdp_server_handle_client_req (tCONN_CB *p_ccb, BT_HDR *p_msg)
default:
sdpu_build_n_send_error (p_ccb, trans_num, SDP_INVALID_REQ_SYNTAX, SDP_TEXT_BAD_PDU);
SDP_TRACE_WARNING ("SDP - server got unknown PDU: 0x%x", pdu_id);
SDP_TRACE_WARNING ("SDP - server got unknown PDU: 0x%x\n", pdu_id);
break;
}
}
@@ -258,7 +258,7 @@ static void process_service_search (tCONN_CB *p_ccb, UINT16 trans_num,
/* Get a buffer to use to build the response */
if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
{
SDP_TRACE_ERROR ("SDP - no buf for search rsp");
SDP_TRACE_ERROR ("SDP - no buf for search rsp\n");
return;
}
p_buf->offset = L2CAP_MIN_OFFSET;
@@ -373,7 +373,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
p_ccb->rsp_list = (UINT8 *)GKI_getbuf(max_list_len);
if (p_ccb->rsp_list == NULL)
{
SDP_TRACE_ERROR("%s No scratch buf for attr rsp", __func__);
SDP_TRACE_ERROR("%s No scratch buf for attr rsp\n", __func__);
return;
}
@@ -415,7 +415,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
p_ccb->rsp_list = (UINT8 *)GKI_getbuf (max_list_len);
if (p_ccb->rsp_list == NULL)
{
SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp");
SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp\n");
return;
}
}
@@ -464,7 +464,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
{
if (attr_len >= SDP_MAX_ATTR_LEN)
{
SDP_TRACE_ERROR("SDP attr too big: max_list_len=%d,attr_len=%d", max_list_len, attr_len);
SDP_TRACE_ERROR("SDP attr too big: max_list_len=%d,attr_len=%d\n", max_list_len, attr_len);
sdpu_build_n_send_error (p_ccb, trans_num, SDP_NO_RESOURCES, NULL);
return;
}
@@ -523,7 +523,7 @@ static void process_service_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
/* Get a buffer to use to build the response */
if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
{
SDP_TRACE_ERROR ("SDP - no buf for search rsp");
SDP_TRACE_ERROR ("SDP - no buf for search rsp\n");
return;
}
p_buf->offset = L2CAP_MIN_OFFSET;
@@ -636,7 +636,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
p_ccb->rsp_list = (UINT8 *)GKI_getbuf (max_list_len);
if (p_ccb->rsp_list == NULL)
{
SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp");
SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp\n");
return;
}
@@ -678,7 +678,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
p_ccb->rsp_list = (UINT8 *)GKI_getbuf (max_list_len);
if (p_ccb->rsp_list == NULL)
{
SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp");
SDP_TRACE_ERROR ("SDP - no scratch buf for search rsp\n");
return;
}
}
@@ -751,7 +751,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
{
if (attr_len >= SDP_MAX_ATTR_LEN)
{
SDP_TRACE_ERROR("SDP attr too big: max_list_len=%d,attr_len=%d", max_list_len, attr_len);
SDP_TRACE_ERROR("SDP attr too big: max_list_len=%d,attr_len=%d\n", max_list_len, attr_len);
sdpu_build_n_send_error (p_ccb, trans_num, SDP_NO_RESOURCES, NULL);
return;
}
@@ -859,7 +859,7 @@ static void process_service_search_attr_req (tCONN_CB *p_ccb, UINT16 trans_num,
/* Get a buffer to use to build the response */
if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
{
SDP_TRACE_ERROR ("SDP - no buf for search rsp");
SDP_TRACE_ERROR ("SDP - no buf for search rsp\n");
return;
}
p_buf->offset = L2CAP_MIN_OFFSET;
@@ -158,7 +158,7 @@ void sdpu_release_ccb (tCONN_CB *p_ccb)
/* Free the response buffer */
if (p_ccb->rsp_list)
{
SDP_TRACE_DEBUG("releasing SDP rsp_list");
SDP_TRACE_DEBUG("releasing SDP rsp_list\n");
GKI_freebuf(p_ccb->rsp_list);
p_ccb->rsp_list = NULL;
@@ -323,13 +323,13 @@ void sdpu_build_n_send_error (tCONN_CB *p_ccb, UINT16 trans_num, UINT16 error_co
BT_HDR *p_buf;
SDP_TRACE_WARNING ("SDP - sdpu_build_n_send_error code: 0x%x CID: 0x%x",
SDP_TRACE_WARNING ("SDP - sdpu_build_n_send_error code: 0x%x CID: 0x%x\n",
error_code, p_ccb->connection_id);
/* Get a buffer to use to build and send the packet to L2CAP */
if ((p_buf = (BT_HDR *)GKI_getpoolbuf (SDP_POOL_ID)) == NULL)
{
SDP_TRACE_ERROR ("SDP - no buf for err msg");
SDP_TRACE_ERROR ("SDP - no buf for err msg\n");
return;
}
p_buf->offset = L2CAP_MIN_OFFSET;
@@ -674,7 +674,7 @@ BOOLEAN sdpu_compare_uuid_arrays (UINT8 *p_uuid1, UINT32 len1, UINT8 *p_uuid2, U
if( ((len1 != 2) && (len1 != 4) && (len1 != 16)) ||
((len2 != 2) && (len2 != 4) && (len2 != 16)) )
{
SDP_TRACE_ERROR("%s: invalid length", __func__);
SDP_TRACE_ERROR("%s: invalid length\n", __func__);
return FALSE;
}
@@ -1019,7 +1019,7 @@ UINT8 *sdpu_build_partial_attrib_entry (UINT8 *p_out, tSDP_ATTRIBUTE *p_attr, UI
if ((p_attr_buff = (UINT8 *) GKI_getbuf(sizeof(UINT8) * SDP_MAX_ATTR_LEN )) == NULL)
{
SDP_TRACE_ERROR("sdpu_build_partial_attrib_entry cannot get a buffer!");
SDP_TRACE_ERROR("sdpu_build_partial_attrib_entry cannot get a buffer!\n");
return NULL;
}
p_tmp_attr = p_attr_buff;