*
******************************************************************************/
+#define LOG_TAG "bt_bta_dm"
+
+#include <string.h>
+
#include "bt_target.h"
#include "bt_types.h"
-#include "gki.h"
-#include "bta_sys.h"
#include "bta_api.h"
-#include "bta_dm_int.h"
#include "bta_dm_co.h"
+#include "bta_dm_int.h"
+#include "bta_sys.h"
#include "btm_api.h"
#include "btm_int.h"
#include "btu.h"
-#include "sdp_api.h"
-#include "l2c_api.h"
-#include "utl.h"
#include "gap_api.h" /* For GAP_BleReadPeerPrefConnParams */
-#include <string.h>
-
-#define LOG_TAG "bt_bta_dm"
+#include "gki.h"
+#include "l2c_api.h"
#include "osi/include/log.h"
+#include "osi/include/osi.h"
+#include "sdp_api.h"
+#include "utl.h"
#if (GAP_INCLUDED == TRUE)
#include "gap_api.h"
else
{
bta_dm_cb.disable_timer.p_cback = (TIMER_CBACK*)&bta_dm_disable_timer_cback;
- bta_dm_cb.disable_timer.param = 0;
+ bta_dm_cb.disable_timer.param = INT_TO_PTR(0);
bta_sys_start_timer(&bta_dm_cb.disable_timer, 0, 5000);
}
APPL_TRACE_EVENT(" bta_dm_disable_timer_cback trial %d ", p_tle->param);
- if(BTM_GetNumAclLinks() && p_tle->param == 0)
+ if(BTM_GetNumAclLinks() && PTR_TO_INT(p_tle->param) == 0)
{
for(i=0; i<bta_dm_cb.device_list.count; i++)
{
if (trigger_disc)
{
bta_dm_cb.disable_timer.p_cback = (TIMER_CBACK*)&bta_dm_disable_timer_cback;
- bta_dm_cb.disable_timer.param = 1;
+ bta_dm_cb.disable_timer.param = INT_TO_PTR(1);
bta_sys_start_timer(&bta_dm_cb.disable_timer, 0, 1500);
}
}
{
tSDP_UUID uuid;
- UINT16 num_attrs = 1;
tBTA_DM_MSG *p_msg;
memset (&uuid, 0, sizeof(tSDP_UUID));
/* try to search all services by search based on L2CAP UUID */
if(bta_dm_search_cb.services == BTA_ALL_SERVICE_MASK )
{
- LOG_INFO("%s services_to_search=%08x", __func__, bta_dm_search_cb.services_to_search);
+ LOG_INFO(LOG_TAG, "%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];
memcpy(&uuid, &bta_dm_search_cb.uuid, sizeof(tSDP_UUID));
}
- LOG_INFO("%s search UUID = %04x", __func__, uuid.uu.uuid16);
+ LOG_INFO(LOG_TAG, "%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));
tBTM_STATUS status = BTM_SUCCESS;
tBTA_DM_SEC sec_event;
char *p_name = NULL;
- UINT8 i;
- tBT_DEVICE_TYPE dev_type;
if (!bta_dm_cb.p_sec_cback)
return BTM_NOT_AUTHORIZED;
tBTA_STATUS status = BTA_FAILURE;
if (BTM_BleWriteAdvData(p_data->ble_set_adv_data.data_mask,
- (tBTM_BLE_ADV_DATA *)p_data->ble_set_adv_data.p_adv_cfg) == BTM_SUCCESS)
+ (tBTM_BLE_ADV_DATA *)&p_data->ble_set_adv_data.adv_cfg) == BTM_SUCCESS)
{
status = BTA_SUCCESS;
}
tBTA_STATUS status = BTA_FAILURE;
if(BTM_BleWriteScanRsp(p_data->ble_set_adv_data.data_mask,
- (tBTM_BLE_ADV_DATA *)p_data->ble_set_adv_data.p_adv_cfg) == BTM_SUCCESS)
+ (tBTM_BLE_ADV_DATA *)&p_data->ble_set_adv_data.adv_cfg) == BTM_SUCCESS)
{
status = BTA_SUCCESS;
}
btm_status = BTM_BleCfgAdvInstData(p_data->ble_multi_adv_data.inst_id,
p_data->ble_multi_adv_data.is_scan_rsp,
p_data->ble_multi_adv_data.data_mask,
- (tBTM_BLE_ADV_DATA*)p_data->ble_multi_adv_data.p_data);
+ (tBTM_BLE_ADV_DATA*)&p_data->ble_multi_adv_data.data);
}
if(BTM_CMD_STARTED != btm_status)
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 );
}
- LOG_INFO("%s service_id_uuid_len=%d ", __func__, service_id.uuid.len);
+ LOG_INFO(LOG_TAG, "%s service_id_uuid_len=%d ", __func__, service_id.uuid.len);
if ( bta_dm_search_cb.state != BTA_DM_SEARCH_IDLE)
{