mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/add_bda_to_read_rmt_name_param_v4.1' into 'release/v4.1'
Bugfix/add bda to read rmt name param v4.1 See merge request espressif/esp-idf!18283
This commit is contained in:
commit
2b16127192
@ -336,6 +336,7 @@ typedef union {
|
|||||||
struct read_rmt_name_param {
|
struct read_rmt_name_param {
|
||||||
esp_bt_status_t stat; /*!< read Remote Name status */
|
esp_bt_status_t stat; /*!< read Remote Name status */
|
||||||
uint8_t rmt_name[ESP_BT_GAP_MAX_BDNAME_LEN + 1]; /*!< Remote device name */
|
uint8_t rmt_name[ESP_BT_GAP_MAX_BDNAME_LEN + 1]; /*!< Remote device name */
|
||||||
|
esp_bd_addr_t bda; /*!< remote bluetooth device address*/
|
||||||
} read_rmt_name; /*!< read Remote Name parameter struct */
|
} read_rmt_name; /*!< read Remote Name parameter struct */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -743,6 +743,7 @@ static void btc_gap_bt_read_remote_name_cmpl_callback(void *p_data)
|
|||||||
msg.pid = BTC_PID_GAP_BT;
|
msg.pid = BTC_PID_GAP_BT;
|
||||||
msg.act = BTC_GAP_BT_READ_REMOTE_NAME_EVT;
|
msg.act = BTC_GAP_BT_READ_REMOTE_NAME_EVT;
|
||||||
|
|
||||||
|
memcpy(param.read_rmt_name.bda,result->bd_addr,BD_ADDR_LEN);
|
||||||
param.read_rmt_name.stat = btc_btm_status_to_esp_status(result->status);
|
param.read_rmt_name.stat = btc_btm_status_to_esp_status(result->status);
|
||||||
memcpy(param.read_rmt_name.rmt_name,result->remote_bd_name,ESP_BT_GAP_MAX_BDNAME_LEN);
|
memcpy(param.read_rmt_name.rmt_name,result->remote_bd_name,ESP_BT_GAP_MAX_BDNAME_LEN);
|
||||||
|
|
||||||
|
@ -2306,6 +2306,7 @@ void btm_process_remote_name (BD_ADDR bda, BD_NAME bdn, UINT16 evt_len, UINT8 hc
|
|||||||
rem_name.length = 0;
|
rem_name.length = 0;
|
||||||
rem_name.remote_bd_name[0] = 0;
|
rem_name.remote_bd_name[0] = 0;
|
||||||
}
|
}
|
||||||
|
memcpy(rem_name.bd_addr, p_inq->remname_bda, BD_ADDR_LEN);
|
||||||
/* Reset the remote BAD to zero and call callback if possible */
|
/* Reset the remote BAD to zero and call callback if possible */
|
||||||
memset(p_inq->remname_bda, 0, BD_ADDR_LEN);
|
memset(p_inq->remname_bda, 0, BD_ADDR_LEN);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user