uint16_t handle, void* data) {
if (status != GATT_SUCCESS) {
LOG(ERROR) << __func__ << ": handle=" << handle << ", conn_id=" << conn_id
- << ", status=" << loghex(status);
+ << ", status=" << loghex(static_cast<uint8_t>(status));
}
}
send_state_change_to_other_side(hearingDevice, conn_update);
send_state_change(hearingDevice, conn_update);
} else {
- LOG(INFO) << __func__
- << ": error status=" << loghex(p_data->conn_update.status)
+ LOG(INFO) << __func__ << ": error status="
+ << loghex(static_cast<uint8_t>(p_data->conn_update.status))
<< ", conn_id=" << conn_id
<< ", device=" << hearingDevice->address
<< ", connection_update_status="
if (register_status != GATT_SUCCESS) {
LOG(ERROR) << __func__
<< ": BTA_GATTC_RegisterForNotifications failed, status="
- << loghex(register_status);
+ << loghex(static_cast<uint8_t>(register_status));
return;
}
std::vector<uint8_t> value(2);
tGATT_TCB* p_tcb = gatt_get_tcb_by_idx(tcb_idx);
VLOG(1) << __func__ << ": conn_id=" << loghex(conn_id)
- << ", trans_id=" << loghex(trans_id) << ", status=" << loghex(status);
+ << ", trans_id=" << loghex(trans_id)
+ << ", status=" << loghex(static_cast<uint8_t>(status));
if ((p_reg == NULL) || (p_tcb == NULL)) {
LOG(ERROR) << "Unknown conn_id=" << loghex(conn_id);
tGATT_STATUS status = GATTC_Read(conn_id, GATT_READ_BY_TYPE, ¶m);
if (status != GATT_SUCCESS) {
- LOG(ERROR) << __func__ << " Read failed. Status: " << loghex(status);
+ LOG(ERROR) << __func__ << " Read failed. Status: "
+ << loghex(static_cast<uint8_t>(status));
return false;
}
tGATT_STATUS status = GATTC_Write(conn_id, GATT_WRITE, &attr);
if (status != GATT_SUCCESS) {
- LOG(ERROR) << __func__ << " Write failed. Status: " << loghex(status);
+ LOG(ERROR) << __func__ << " Write failed. Status: "
+ << loghex(static_cast<uint8_t>(status));
return false;
}
tGATT_CL_COMPLETE* p_data) {
auto iter = OngoingOps.find(conn_id);
- VLOG(1) << __func__ << " opcode: " << loghex(op)
- << " status: " << loghex(status) << " conn id: " << loghex(conn_id);
+ VLOG(1) << __func__ << " opcode: " << loghex(op) << " status: " << status
+ << " conn id: " << loghex(static_cast<uint8_t>(conn_id));
if (op != GATTC_OPTYPE_READ) return;
}
if (p_clcb->operation == GATTC_OPTYPE_DISCOVERY) {
- gatt_proc_disc_error_rsp(tcb, p_clcb, opcode, handle, reason);
+ gatt_proc_disc_error_rsp(tcb, p_clcb, opcode, handle,
+ static_cast<tGATT_STATUS>(reason));
} else {
if ((p_clcb->operation == GATTC_OPTYPE_WRITE) &&
(p_clcb->op_subtype == GATT_WRITE) &&
(opcode == GATT_REQ_PREPARE_WRITE) && (p_attr) &&
(handle == p_attr->handle)) {
- p_clcb->status = reason;
+ p_clcb->status = static_cast<tGATT_STATUS>(reason);
gatt_send_queue_write_cancel(tcb, p_clcb, GATT_PREP_WRITE_CANCEL);
} else if ((p_clcb->operation == GATTC_OPTYPE_READ) &&
((p_clcb->op_subtype == GATT_READ_CHAR_VALUE_HDL) ||