mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
Merge branch 'bugfix/set_eir_when_no_eir_data_v5.1' into 'release/v5.1'
change(bt/bluedroid): Send a name tag with zero length when there is no EIR data See merge request espressif/esp-idf!25949
This commit is contained in:
@ -4306,6 +4306,17 @@ static void bta_dm_set_eir (char *local_name)
|
||||
}
|
||||
}
|
||||
|
||||
/* If there is no other data to be sent in the EIR packet, the Host shall
|
||||
* send a name tag with zero length and the type field set to indicate
|
||||
* that this is the complete name (i.e., total of 2 octets with length =
|
||||
* 1).
|
||||
*/
|
||||
if (eir_type_num == 0) {
|
||||
UINT8_TO_STREAM(p, 1);
|
||||
UINT8_TO_STREAM(p, BTM_EIR_COMPLETE_LOCAL_NAME_TYPE);
|
||||
free_eir_length -= 2;
|
||||
}
|
||||
|
||||
if (free_eir_length) {
|
||||
UINT8_TO_STREAM(p, 0); /* terminator of significant part */
|
||||
}
|
||||
|
Reference in New Issue
Block a user