cb_data.close.client_if = p_clcb->p_rcb->client_if;
cb_data.close.conn_id = p_clcb->bta_conn_id;
- cb_data.close.reason = 0;
+ cb_data.close.reason = GATT_CONN_OK;
cb_data.close.remote_bda = p_clcb->bda;
cb_data.close.status = GATT_SUCCESS;
typedef struct {
BT_HDR_RIGID hdr;
uint16_t conn_id;
- tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect
- event is reported */
-
+ tGATT_DISCONN_REASON reason;
} tBTA_HH_LE_CLOSE;
typedef struct {
tGATT_STATUS status;
tGATT_IF client_if;
RawAddress remote_bda;
- tBTA_GATT_REASON reason; /* disconnect reason code, not useful when connect
- event is reported */
+ tGATT_DISCONN_REASON reason;
} tBTA_GATTC_CLOSE;
typedef struct {
}
void OnGattDisconnected(uint16_t connection_id, tGATT_IF /*client_if*/,
- RawAddress remote_bda, tBTA_GATT_REASON /*reason*/) {
+ RawAddress remote_bda,
+ tGATT_DISCONN_REASON /*reason*/) {
VolumeControlDevice* device =
volume_control_devices_.FindByConnId(connection_id);
if (!device) {
.conn_id = conn_id,
.client_if = gatt_if,
.remote_bda = address,
- .reason = HCI_ERR_PEER_USER,
+ .reason = GATT_CONN_TERMINATE_PEER_USER,
};
gatt_callback(BTA_GATTC_CLOSE_EVT, (tBTA_GATTC*)&event_data);