@@ -167,7 +167,7 @@ void BLEManagerImpl::HandleAdvertisingTimeout(chip::System::Layer *, void * appS
167167 VerifyOrReturn (self->mFlags .Has (Flags::kFastAdvertisingEnabled ));
168168
169169 ChipLogDetail (DeviceLayer, " bleAdv Timeout : Start slow advertisement" );
170- self->_SetAdvertisingMode (BLEAdvertisingMode::kSlowAdvertising );
170+ TEMPORARY_RETURN_IGNORED self->_SetAdvertisingMode (BLEAdvertisingMode::kSlowAdvertising );
171171}
172172
173173BLEManagerImpl::AdvertisingIntervals BLEManagerImpl::GetAdvertisingIntervals () const
@@ -300,23 +300,23 @@ void BLEManagerImpl::AdvertisingStateChangedCb(int result, bt_advertiser_h adver
300300 {
301301 mFlags .Set (Flags::kAdvertising );
302302 NotifyBLEPeripheralAdvStartComplete (CHIP_NO_ERROR);
303- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] {
303+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ] {
304304 // Start a timer to make sure that the fast advertising is stopped after specified timeout.
305- DeviceLayer::SystemLayer ().StartTimer (kFastAdvertiseTimeout , HandleAdvertisingTimeout, this );
305+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().StartTimer (kFastAdvertiseTimeout , HandleAdvertisingTimeout, this );
306306 });
307307 }
308308 else
309309 {
310310 mFlags .Clear (Flags::kAdvertising );
311311 NotifyBLEPeripheralAdvStopComplete (CHIP_NO_ERROR);
312- DeviceLayer::SystemLayer ().ScheduleLambda (
312+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda (
313313 [this ] { DeviceLayer::SystemLayer ().CancelTimer (HandleAdvertisingTimeout, this ); });
314314 }
315315
316316 if (mFlags .Has (Flags::kAdvertisingRefreshNeeded ))
317317 {
318318 mFlags .Clear (Flags::kAdvertisingRefreshNeeded );
319- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveBLEState (); });
319+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveBLEState (); });
320320 }
321321
322322 mAdvReqInProgress = false ;
@@ -480,14 +480,14 @@ void BLEManagerImpl::OnDeviceScanned(const bt_adapter_le_device_scan_result_info
480480 // StopScan should also be performed in the ChipStack thread.
481481 // At the same time, the scan timer also needs to be canceled in the ChipStack thread.
482482 DeviceLayer::SystemLayer ().CancelTimer (HandleScanTimeout, this );
483- mDeviceScanner .StopScan ();
483+ TEMPORARY_RETURN_IGNORED mDeviceScanner .StopScan ();
484484 // Stop scanning and then start connecting timer
485- DeviceLayer::SystemLayer ().StartTimer (kConnectTimeout , HandleConnectionTimeout, this );
485+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().StartTimer (kConnectTimeout , HandleConnectionTimeout, this );
486486 chip::DeviceLayer::PlatformMgr ().UnlockChipStack ();
487487
488488 /* Initiate Connect */
489489 auto params = std::make_pair (this , scanInfo.remote_address );
490- PlatformMgrImpl ().GLibMatterContextInvokeSync (
490+ TEMPORARY_RETURN_IGNORED PlatformMgrImpl ().GLibMatterContextInvokeSync (
491491 +[](decltype (params) * aParams) { return aParams->first ->ConnectChipThing (aParams->second ); }, ¶ms);
492492}
493493
@@ -843,7 +843,7 @@ void BLEManagerImpl::RemoveConnection(const char * remoteAddr)
843843 // immediately, because the BLE layer might still use it. Instead, we will also
844844 // schedule the deletion of the connection object, so it will happen after the
845845 // BLE layer has processed the disconnection event.
846- DeviceLayer::SystemLayer ().ScheduleLambda ([conn] {
846+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([conn] {
847847 ChipLogDetail (DeviceLayer, " Freeing BLE connection" );
848848 chip::Platform::Delete (conn);
849849 });
@@ -1271,7 +1271,8 @@ void BLEManagerImpl::NewConnection(BleLayer * bleLayer, void * appState, const S
12711271 }
12721272
12731273 // Scan initiation performed async, to ensure that the BLE subsystem is initialized.
1274- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { InitiateScan (BleScanState::kScanForDiscriminator ); });
1274+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda (
1275+ [this ] { InitiateScan (BleScanState::kScanForDiscriminator ); });
12751276}
12761277
12771278void BLEManagerImpl::InitiateScan (BleScanState scanType)
@@ -1288,11 +1289,11 @@ void BLEManagerImpl::InitiateScan(BleScanState scanType)
12881289 /* Send StartScan Request to Scanner Class */
12891290 strcpy (data.service_uuid , Ble::CHIP_BLE_SERVICE_SHORT_UUID_STR);
12901291 err = mDeviceScanner .StartScan (ScanFilterType::kServiceData , data);
1291- VerifyOrExit (err == CHIP_NO_ERROR, ChipLogError ( Ble, " Failed to start BLE scan: % " CHIP_ERROR_FORMAT, err. Format () ));
1292+ SuccessOrExitAction (err, ChipLogFailure (err, Ble, " Failed to start BLE scan" ));
12921293
12931294 err = DeviceLayer::SystemLayer ().StartTimer (kNewConnectionScanTimeout , HandleScanTimeout, this );
1294- VerifyOrExit (err == CHIP_NO_ERROR, mDeviceScanner .StopScan ();
1295- ChipLogError ( Ble, " Failed to start BLE scan timeout: % " CHIP_ERROR_FORMAT, err. Format () ));
1295+ SuccessOrExitAction (err, TEMPORARY_RETURN_IGNORED mDeviceScanner .StopScan ();
1296+ ChipLogFailure (err, Ble, " Failed to start BLE scan timeout" ));
12961297
12971298 mBLEScanConfig .mBleScanState = scanType;
12981299 return ;
@@ -1306,7 +1307,7 @@ void BLEManagerImpl::HandleScanTimeout(chip::System::Layer *, void * appState)
13061307{
13071308 auto * manager = static_cast <BLEManagerImpl *>(appState);
13081309 manager->OnScanError (CHIP_ERROR_TIMEOUT);
1309- manager->mDeviceScanner .StopScan ();
1310+ TEMPORARY_RETURN_IGNORED manager->mDeviceScanner .StopScan ();
13101311}
13111312
13121313CHIP_ERROR BLEManagerImpl::CancelConnection ()
@@ -1315,7 +1316,7 @@ CHIP_ERROR BLEManagerImpl::CancelConnection()
13151316 if (mBLEScanConfig .mBleScanState != BleScanState::kNotScanning )
13161317 {
13171318 DeviceLayer::SystemLayer ().CancelTimer (HandleScanTimeout, this );
1318- mDeviceScanner .StopScan ();
1319+ TEMPORARY_RETURN_IGNORED mDeviceScanner .StopScan ();
13191320 }
13201321 return CHIP_NO_ERROR;
13211322}
0 commit comments