mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-19 23:45:28 +02:00
fix(bt): Fix ble periodic advertising data length 0 error
- Fixed issues about data length 0 when set ext adv data,ext scan rsp data and periodic adv data
This commit is contained in:
@@ -2853,7 +2853,7 @@ void BTA_DmBleGapConfigExtAdvDataRaw(BOOLEAN is_scan_rsp, UINT8 instance, UINT16
|
||||
p_msg->is_scan_rsp = is_scan_rsp;
|
||||
p_msg->instance = instance;
|
||||
p_msg->length = length;
|
||||
p_msg->data = (UINT8 *)(p_msg + 1);
|
||||
p_msg->data = length != 0 ? (UINT8 *)(p_msg + 1) : NULL;
|
||||
if (data) {
|
||||
memcpy(p_msg->data, data, length);
|
||||
}
|
||||
@@ -2943,6 +2943,7 @@ void BTA_DmBleGapPeriodicAdvCfgDataRaw(UINT8 instance, UINT16 length,
|
||||
p_msg->length = length;
|
||||
p_msg->data = (UINT8 *)(p_msg + 1);
|
||||
memcpy(p_msg->data, data, length);
|
||||
p_msg->data = length != 0 ? (UINT8 *)(p_msg + 1) : NULL;
|
||||
//start sent the msg to the bta system control moudle
|
||||
bta_sys_sendmsg(p_msg);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user