forked from espressif/esp-idf
component/bt : fix bug of bdaddr point to resolve gattc recv notify
This commit is contained in:
@@ -340,7 +340,7 @@ esp_gatt_status_t esp_ble_gattc_register_for_notify (esp_gatt_if_t gatt_if,
|
||||
msg.pid = BTC_PID_GATTC;
|
||||
msg.act = BTC_GATTC_ACT_REG_FOR_NOTIFY;
|
||||
arg.reg_for_notify.gatt_if = gatt_if;
|
||||
memcpy(&arg.reg_for_notify.remote_bda, &server_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(arg.reg_for_notify.remote_bda, server_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(&arg.reg_for_notify.service_id, srvc_id, sizeof(esp_gatt_srvc_id_t));
|
||||
memcpy(&arg.reg_for_notify.char_id, char_id, sizeof(esp_gatt_id_t));
|
||||
|
||||
@@ -359,7 +359,7 @@ esp_gatt_status_t esp_ble_gattc_unregister_for_notify (esp_gatt_if_t gatt_if,
|
||||
msg.pid = BTC_PID_GATTC;
|
||||
msg.act = BTC_GATTC_ACT_UNREG_FOR_NOTIFY;
|
||||
arg.unreg_for_notify.gatt_if = gatt_if;
|
||||
memcpy(&arg.unreg_for_notify.remote_bda, &server_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(arg.unreg_for_notify.remote_bda, server_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(&arg.unreg_for_notify.service_id, srvc_id, sizeof(esp_gatt_srvc_id_t));
|
||||
memcpy(&arg.unreg_for_notify.char_id, char_id, sizeof(esp_gatt_id_t));
|
||||
|
||||
|
@@ -584,7 +584,7 @@ void btc_gattc_cb_handler(btc_msg_t *msg)
|
||||
case BTA_GATTC_NOTIF_EVT: {
|
||||
tBTA_GATTC_NOTIFY *notify = &arg->notify;
|
||||
param.notify.conn_id = notify->conn_id;
|
||||
memcpy(¶m.notify.remote_bda, ¬ify->bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.notify.remote_bda, notify->bda, sizeof(esp_bd_addr_t));
|
||||
bta_to_btc_srvc_id(¶m.notify.srvc_id, ¬ify->char_id.srvc_id);
|
||||
bta_to_btc_gatt_id(¶m.notify.char_id, ¬ify->char_id.char_id);
|
||||
bta_to_btc_gatt_id(¶m.notify.descr_id, ¬ify->descr_type);
|
||||
@@ -605,7 +605,7 @@ void btc_gattc_cb_handler(btc_msg_t *msg)
|
||||
param.open.status = open->status;
|
||||
param.open.conn_id = open->conn_id;
|
||||
param.open.gatt_if = open->client_if;
|
||||
memcpy(¶m.open.remote_bda, &open->remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.open.remote_bda, open->remote_bda, sizeof(esp_bd_addr_t));
|
||||
param.open.mtu = open->mtu;
|
||||
BTC_GATTC_CB_TO_APP(ESP_GATTC_OPEN_EVT, ¶m);
|
||||
break;
|
||||
@@ -615,7 +615,7 @@ void btc_gattc_cb_handler(btc_msg_t *msg)
|
||||
param.close.status = close->status;
|
||||
param.close.conn_id = close->conn_id;
|
||||
param.close.gatt_if = close->client_if;
|
||||
memcpy(¶m.close.remote_bda, &close->remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.close.remote_bda, close->remote_bda, sizeof(esp_bd_addr_t));
|
||||
param.close.reason = close->reason;
|
||||
BTC_GATTC_CB_TO_APP(ESP_GATTC_CLOSE_EVT, ¶m);
|
||||
break;
|
||||
@@ -646,7 +646,7 @@ void btc_gattc_cb_handler(btc_msg_t *msg)
|
||||
break;
|
||||
}
|
||||
case BTA_GATTC_SRVC_CHG_EVT: {
|
||||
memcpy(¶m.srvc_chg.remote_bda, &arg->remote_bda, sizeof(esp_bd_addr_t));
|
||||
memcpy(param.srvc_chg.remote_bda, arg->remote_bda, sizeof(esp_bd_addr_t));
|
||||
BTC_GATTC_CB_TO_APP(ESP_GATTC_SRVC_CHG_EVT, ¶m);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user