mirror of
https://gitee.com/openharmony/communication_dsoftbus
synced 2024-11-23 08:49:59 +00:00
fix:Gatt adapter without release advData when SoftbusSetLpParam failed
Signed-off-by: wangxin617 <wangxin617@huawei.com>
This commit is contained in:
parent
ae61f65363
commit
2d179267c0
@ -743,13 +743,13 @@ static bool SoftbusSetLpParam(LpServerType type,
|
||||
scanConfig.scanMode = GetBtScanMode(scanParam->scanParam.scanInterval, scanParam->scanParam.scanWindow);
|
||||
BtLpDeviceParam lpParam = {};
|
||||
lpParam.scanConfig = &scanConfig;
|
||||
lpParam.rawData.advData = (unsigned char *)AssembleAdvData(&bcParam->advData,
|
||||
(uint16_t *)&lpParam.rawData.advDataLen);
|
||||
DISC_CHECK_AND_RETURN_RET_LOGE(lpParam.rawData.advData != NULL, false, DISC_BLE_ADAPTER, "assemble advData failed");
|
||||
if (SetBtUuidByBroadCastType(type, &lpParam.uuid) != SOFTBUS_OK) {
|
||||
DISC_LOGE(DISC_BLE_ADAPTER, "set bt uuid failed, advHandle=%{public}d", bcParam->advHandle);
|
||||
return false;
|
||||
}
|
||||
lpParam.rawData.advData = (unsigned char *)AssembleAdvData(&bcParam->advData,
|
||||
(uint16_t *)&lpParam.rawData.advDataLen);
|
||||
DISC_CHECK_AND_RETURN_RET_LOGE(lpParam.rawData.advData != NULL, false, DISC_BLE_ADAPTER, "assemble advData failed");
|
||||
if (bcParam->advData.rspData.payloadLen > 0 && bcParam->advData.rspData.payload != NULL) {
|
||||
lpParam.rawData.rspData = (unsigned char *)AssembleRspData(&bcParam->advData.rspData,
|
||||
(uint16_t *)&lpParam.rawData.rspDataLen);
|
||||
|
Loading…
Reference in New Issue
Block a user