@@ -144,10 +144,10 @@ CHIP_ERROR ConnectivityManagerImpl::_Init()
144144 }
145145#endif
146146#if CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF
147- WiFiPAF::WiFiPAFLayer::GetWiFiPAFLayer ().Init (&DeviceLayer::SystemLayer ());
148- #endif
149-
147+ return WiFiPAF::WiFiPAFLayer::GetWiFiPAFLayer ().Init (&DeviceLayer::SystemLayer ());
148+ #else
150149 return CHIP_NO_ERROR;
150+ #endif
151151}
152152
153153void ConnectivityManagerImpl::_OnPlatformEvent (const ChipDeviceEvent * event)
@@ -171,7 +171,8 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event)
171171 ChipLogProgress (DeviceLayer, " WiFi-PAF: event: kCHIPoWiFiPAFConnected" );
172172 WiFiPAF::WiFiPAFSession SessionInfo;
173173 memcpy (&SessionInfo, &event->CHIPoWiFiPAFReceived .SessionInfo , sizeof (WiFiPAF::WiFiPAFSession));
174- WiFiPafLayer.HandleTransportConnectionInitiated (SessionInfo, mOnPafSubscribeComplete , mAppState , mOnPafSubscribeError );
174+ TEMPORARY_RETURN_IGNORED WiFiPafLayer.HandleTransportConnectionInitiated (SessionInfo, mOnPafSubscribeComplete , mAppState ,
175+ mOnPafSubscribeError );
175176 break ;
176177 }
177178 case DeviceEventType::kCHIPoWiFiPAFCancelConnect : {
@@ -187,7 +188,7 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event)
187188 ChipLogProgress (DeviceLayer, " WiFi-PAF: event: kCHIPoWiFiPAFWriteDone" );
188189 WiFiPAF::WiFiPAFSession TxInfo;
189190 memcpy (&TxInfo, &event->CHIPoWiFiPAFReceived .SessionInfo , sizeof (WiFiPAF::WiFiPAFSession));
190- WiFiPafLayer.HandleWriteConfirmed (TxInfo, event->CHIPoWiFiPAFReceived .result );
191+ TEMPORARY_RETURN_IGNORED WiFiPafLayer.HandleWriteConfirmed (TxInfo, event->CHIPoWiFiPAFReceived .result );
191192 break ;
192193 }
193194 }
@@ -311,7 +312,7 @@ CHIP_ERROR ConnectivityManagerImpl::_SetWiFiAPMode(WiFiAPMode val)
311312 ChipLogProgress (DeviceLayer, " WiFi AP mode change: %s -> %s" , WiFiAPModeToStr (mWiFiAPMode ), WiFiAPModeToStr (val));
312313 mWiFiAPMode = val;
313314
314- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
315+ return DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
315316 }
316317
317318exit:
@@ -324,7 +325,7 @@ void ConnectivityManagerImpl::_DemandStartWiFiAP()
324325 {
325326 ChipLogProgress (DeviceLayer, " wpa_supplicant: Demand start WiFi AP" );
326327 mLastAPDemandTime = System::SystemClock ().GetMonotonicTimestamp ();
327- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
328+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
328329 }
329330 else
330331 {
@@ -338,7 +339,7 @@ void ConnectivityManagerImpl::_StopOnDemandWiFiAP()
338339 {
339340 ChipLogProgress (DeviceLayer, " wpa_supplicant: Demand stop WiFi AP" );
340341 mLastAPDemandTime = System::Clock::kZero ;
341- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
342+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
342343 }
343344 else
344345 {
@@ -360,7 +361,7 @@ void ConnectivityManagerImpl::_MaintainOnDemandWiFiAP()
360361void ConnectivityManagerImpl::_SetWiFiAPIdleTimeout (System::Clock::Timeout val)
361362{
362363 mWiFiAPIdleTimeout = val;
363- DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
364+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ] { DriveAPState (); });
364365}
365366
366367void ConnectivityManagerImpl::NotifyWiFiConnectivityChange (ConnectivityChange change)
@@ -413,7 +414,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaSupplicant1Interface *
413414
414415 if (delegate != nullptr )
415416 {
416- DeviceLayer::SystemLayer ().ScheduleLambda ([delegate, reason]() {
417+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([delegate, reason]() {
417418 delegate->OnDisconnectionDetected (reason);
418419 delegate->OnConnectionStatusChanged (static_cast <uint8_t >(ConnectionStatusEnum::kNotConnected ));
419420 });
@@ -444,7 +445,7 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaSupplicant1Interface *
444445 break ;
445446 }
446447
447- DeviceLayer::SystemLayer ().ScheduleLambda ([this , reason]() {
448+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this , reason]() {
448449 if (mpConnectCallback != nullptr )
449450 {
450451 mpConnectCallback->OnResult (NetworkCommissioning::Status::kUnknownError , CharSpan (), reason);
@@ -453,13 +454,13 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaSupplicant1Interface *
453454 });
454455 if (delegate != nullptr )
455456 {
456- DeviceLayer::SystemLayer ().ScheduleLambda ([delegate, associationFailureCause, status]() {
457+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([delegate, associationFailureCause, status]() {
457458 delegate->OnAssociationFailureDetected (associationFailureCause, status);
458459 });
459460 }
460461 }
461462
462- DeviceLayer::SystemLayer ().ScheduleLambda ([]() { ConnectivityMgrImpl ().UpdateNetworkStatus (); });
463+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([]() { ConnectivityMgrImpl ().UpdateNetworkStatus (); });
463464 NotifyWiFiConnectivityChange (kConnectivity_Lost );
464465
465466 mAssociationStarted = false ;
@@ -468,16 +469,16 @@ void ConnectivityManagerImpl::_OnWpaPropertiesChanged(WpaSupplicant1Interface *
468469 {
469470 if (delegate != nullptr )
470471 {
471- DeviceLayer::SystemLayer ().ScheduleLambda (
472+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda (
472473 [delegate]() { delegate->OnConnectionStatusChanged (static_cast <uint8_t >(ConnectionStatusEnum::kConnected )); });
473474 }
474- DeviceLayer::SystemLayer ().ScheduleLambda ([]() { ConnectivityMgrImpl ().UpdateNetworkStatus (); });
475+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([]() { ConnectivityMgrImpl ().UpdateNetworkStatus (); });
475476 }
476477 else if (g_strcmp0 (state, " completed" ) == 0 )
477478 {
478479 if (mAssociationStarted )
479480 {
480- DeviceLayer::SystemLayer ().ScheduleLambda ([this ]() {
481+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ]() {
481482 if (mpConnectCallback != nullptr )
482483 {
483484 mpConnectCallback->OnResult (NetworkCommissioning::Status::kSuccess , CharSpan (), 0 );
@@ -524,7 +525,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceProxyReady(GObject * sourceObject,
524525 }
525526
526527 // We need to stop auto scan or it will block our network scan.
527- DeviceLayer::SystemLayer ().ScheduleLambda ([this ]() {
528+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ]() {
528529 CHIP_ERROR errInner = StopAutoScan ();
529530 if (errInner != CHIP_NO_ERROR)
530531 {
@@ -765,7 +766,7 @@ CHIP_ERROR ConnectivityManagerImpl::_WiFiPAFPublish(ConnectivityManager::WiFiPAF
765766 struct PAFPublishSSI PafPublish_ssi;
766767
767768 PafPublish_ssi.DevOpCode = 0 ;
768- VerifyOrDie (DeviceLayer::GetCommissionableDataProvider ()->GetSetupDiscriminator (PafPublish_ssi.DevInfo ) == CHIP_NO_ERROR );
769+ SuccessOrDie (DeviceLayer::GetCommissionableDataProvider ()->GetSetupDiscriminator (PafPublish_ssi.DevInfo ));
769770 if (DeviceLayer::GetDeviceInstanceInfoProvider ()->GetProductId (PafPublish_ssi.ProductId ) != CHIP_NO_ERROR)
770771 {
771772 PafPublish_ssi.ProductId = 0 ;
@@ -849,7 +850,7 @@ void ConnectivityManagerImpl::StartNonConcurrentWiFiManagement()
849850 {
850851 if (IsWiFiManagementStarted ())
851852 {
852- DeviceControlServer::DeviceControlSvr ().PostOperationalNetworkStartedEvent ();
853+ TEMPORARY_RETURN_IGNORED DeviceControlServer::DeviceControlSvr ().PostOperationalNetworkStartedEvent ();
853854 ChipLogProgress (DeviceLayer, " Non-concurrent mode Wi-Fi Management Started." );
854855 return ;
855856 }
@@ -957,7 +958,7 @@ void ConnectivityManagerImpl::DriveAPState()
957958exit:
958959 if (err != CHIP_NO_ERROR)
959960 {
960- SetWiFiAPMode (kWiFiAPMode_Disabled );
961+ TEMPORARY_RETURN_IGNORED SetWiFiAPMode (kWiFiAPMode_Disabled );
961962 ChipLogError (DeviceLayer, " Drive AP state failed: %" CHIP_ERROR_FORMAT, err.Format ());
962963 }
963964}
@@ -1383,7 +1384,7 @@ void ConnectivityManagerImpl::OnReplied(GVariant * reply_info)
13831384 Error Checking
13841385 */
13851386 uint16_t SetupDiscriminator;
1386- DeviceLayer::GetCommissionableDataProvider ()->GetSetupDiscriminator (SetupDiscriminator);
1387+ TEMPORARY_RETURN_IGNORED DeviceLayer::GetCommissionableDataProvider ()->GetSetupDiscriminator (SetupDiscriminator);
13871388 if ((pPublishSSI->DevInfo != SetupDiscriminator) || (srv_proto_type != nan_service_protocol_type::NAN_SRV_PROTO_CSA_MATTER))
13881389 {
13891390 ChipLogProgress (DeviceLayer, " WiFi-PAF: OnReplied, mismatched discriminator, got %u, ours: %u" , pPublishSSI->DevInfo ,
@@ -1417,7 +1418,7 @@ void ConnectivityManagerImpl::OnReplied(GVariant * reply_info)
14171418 pPafInfo->id = publish_id;
14181419 pPafInfo->peer_id = peer_subscribe_id;
14191420 memcpy (pPafInfo->peer_addr , peer_addr, sizeof (uint8_t ) * 6 );
1420- WiFiPafLayer.HandleTransportConnectionInitiated (*pPafInfo);
1421+ TEMPORARY_RETURN_IGNORED WiFiPafLayer.HandleTransportConnectionInitiated (*pPafInfo);
14211422}
14221423
14231424void ConnectivityManagerImpl::OnNanReceive (GVariant * obj)
@@ -1470,15 +1471,15 @@ void ConnectivityManagerImpl::OnNanPublishTerminated(guint public_id, gchar * re
14701471 ChipLogProgress (Controller, " WiFi-PAF: Publish terminated (%u, %s)" , public_id, reason);
14711472 WiFiPAFSession sessionInfo = { .id = public_id };
14721473 WiFiPAFLayer & WiFiPafLayer = WiFiPAFLayer::GetWiFiPAFLayer ();
1473- WiFiPafLayer.RmPafSession (PafInfoAccess::kAccSessionId , sessionInfo);
1474+ TEMPORARY_RETURN_IGNORED WiFiPafLayer.RmPafSession (PafInfoAccess::kAccSessionId , sessionInfo);
14741475}
14751476
14761477void ConnectivityManagerImpl::OnNanSubscribeTerminated (guint subscribe_id, gchar * reason)
14771478{
14781479 ChipLogProgress (Controller, " WiFi-PAF: Subscription terminated (%u, %s)" , subscribe_id, reason);
14791480 WiFiPAFSession sessionInfo = { .id = subscribe_id };
14801481 WiFiPAFLayer & WiFiPafLayer = WiFiPAFLayer::GetWiFiPAFLayer ();
1481- WiFiPafLayer.RmPafSession (PafInfoAccess::kAccSessionId , sessionInfo);
1482+ TEMPORARY_RETURN_IGNORED WiFiPafLayer.RmPafSession (PafInfoAccess::kAccSessionId , sessionInfo);
14821483 /*
14831484 Indicate the connection event
14841485 */
@@ -2216,7 +2217,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceScanDone(WpaSupplicant1Interface *
22162217 if (bsss == nullptr )
22172218 {
22182219 ChipLogProgress (DeviceLayer, " wpa_supplicant: no network found" );
2219- DeviceLayer::SystemLayer ().ScheduleLambda ([this ]() {
2220+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this ]() {
22202221 if (mpScanCallback != nullptr )
22212222 {
22222223 mpScanCallback->OnFinished (Status::kSuccess , CharSpan (), nullptr );
@@ -2240,7 +2241,7 @@ void ConnectivityManagerImpl::_OnWpaInterfaceScanDone(WpaSupplicant1Interface *
22402241 }
22412242 }
22422243
2243- DeviceLayer::SystemLayer ().ScheduleLambda ([this , networkScanned]() {
2244+ TEMPORARY_RETURN_IGNORED DeviceLayer::SystemLayer ().ScheduleLambda ([this , networkScanned]() {
22442245 // Note: We cannot post an event in ScheduleLambda since std::vector is not trivial copyable.
22452246 if (mpScanCallback != nullptr )
22462247 {
0 commit comments