p_dev->dev_handle == dev_handle) {
// We found a device with the same handle. Must be a device reconnected.
APPL_TRACE_WARNING(
- "%s: Found an existing device with the same handle "
- "dev_status = %d",
- __func__, p_dev->dev_status);
- APPL_TRACE_WARNING("%s: bd_addr = [%02X:%02X:%02X:%02X:%02X:]",
- __func__, p_dev->bd_addr.address[0],
- p_dev->bd_addr.address[1], p_dev->bd_addr.address[2],
- p_dev->bd_addr.address[3], p_dev->bd_addr.address[4]);
- APPL_TRACE_WARNING(
- "%s: attr_mask = 0x%04x, sub_class = 0x%02x, app_id = %d",
- __func__, p_dev->attr_mask, p_dev->sub_class, p_dev->app_id);
+ "%s: Found an existing device with the same handle dev_status=%d, "
+ "address=%s, attr_mask=0x%04x, sub_class=0x%02x, app_id=%d",
+ __func__, p_dev->dev_status, p_dev->bd_addr.ToString().c_str(),
+ p_dev->attr_mask, p_dev->sub_class, p_dev->app_id);
if (p_dev->fd < 0) {
p_dev->fd = open(dev_path, O_RDWR | O_CLOEXEC);
case BTA_HD_OPEN_EVT: {
RawAddress* addr = (RawAddress*)&p_data->conn.bda;
- BTIF_TRACE_WARNING(
- "BTA_HD_OPEN_EVT, address (%02x:%02x:%02x:%02x:%02x:%02x)",
- addr->address[0], addr->address[1], addr->address[2],
- addr->address[3], addr->address[4], addr->address[5]);
+ BTIF_TRACE_WARNING("BTA_HD_OPEN_EVT, address=%s",
+ addr->ToString().c_str());
/* Check if the connection is from hid host and not hid device */
if (check_cod_hid(addr)) {
/* Incoming connection from hid device, reject it */
bt_status_t btif_hh_virtual_unplug(const RawAddress* bd_addr) {
BTIF_TRACE_DEBUG("%s", __func__);
btif_hh_device_t* p_dev;
- char bd_str[18];
- snprintf(bd_str, sizeof(bd_str), "%02X:%02X:%02X:%02X:%02X:%02X",
- bd_addr->address[0], bd_addr->address[1], bd_addr->address[2],
- bd_addr->address[3], bd_addr->address[4], bd_addr->address[5]);
p_dev = btif_hh_find_dev_by_bda(*bd_addr);
if ((p_dev != NULL) && (p_dev->dev_status == BTHH_CONN_STATE_CONNECTED) &&
(p_dev->attr_mask & HID_VIRTUAL_CABLE)) {
BTA_HhSendCtrl(p_dev->dev_handle, BTA_HH_CTRL_VIRTUAL_CABLE_UNPLUG);
return BT_STATUS_SUCCESS;
} else {
- BTIF_TRACE_ERROR("%s: Error, device %s not opened.", __func__, bd_str);
+ BTIF_TRACE_ERROR("%s: Error, device %s not opened.", __func__,
+ bd_addr->ToString().c_str());
return BT_STATUS_FAIL;
}
}
CHECK_BTHH_INIT();
BTIF_TRACE_EVENT("BTHH: %s", __func__);
btif_hh_device_t* p_dev;
- char bd_str[18];
- snprintf(bd_str, sizeof(bd_str), "%02X:%02X:%02X:%02X:%02X:%02X",
- bd_addr->address[0], bd_addr->address[1], bd_addr->address[2],
- bd_addr->address[3], bd_addr->address[4], bd_addr->address[5]);
if (btif_hh_cb.status == BTIF_HH_DISABLED) {
BTIF_TRACE_ERROR("%s: Error, HH status = %d", __func__, btif_hh_cb.status);
return BT_STATUS_FAIL;
}
p_dev = btif_hh_find_dev_by_bda(*bd_addr);
if (!p_dev) {
- BTIF_TRACE_ERROR("%s: Error, device %s not opened.", __func__, bd_str);
+ BTIF_TRACE_ERROR("%s: Error, device %s not opened.", __func__,
+ bd_addr->ToString().c_str());
return BT_STATUS_FAIL;
}
btif_transfer_context(btif_hh_handle_evt, BTIF_HH_VUP_REQ_EVT, (char*)bd_addr,