p_clreg->dereg_pending = true;
- BT_HDR buf;
+ BT_HDR_RIGID buf;
buf.event = BTA_GATTC_API_CLOSE_EVT;
buf.layer_specific = bta_gattc_cb.clcb[i].bta_conn_id;
bta_gattc_close(&bta_gattc_cb.clcb[i], (tBTA_GATTC_DATA*)&buf);
/** process connect API request */
void bta_gattc_process_api_open(tBTA_GATTC_DATA* p_msg) {
- uint16_t event = ((BT_HDR*)p_msg)->event;
+ uint16_t event = ((BT_HDR_RIGID*)p_msg)->event;
tBTA_GATTC_RCB* p_clreg = bta_gattc_cl_get_regcb(p_msg->api_conn.client_if);
if (!p_clreg) {
void bta_gattc_process_api_open_cancel(tBTA_GATTC_DATA* p_msg) {
CHECK(p_msg != nullptr);
- uint16_t event = ((BT_HDR*)p_msg)->event;
+ uint16_t event = ((BT_HDR_RIGID*)p_msg)->event;
if (!p_msg->api_cancel_conn.is_direct) {
LOG_DEBUG("Cancel GATT client background connection");