Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/lib/dnssd/Discovery_ImplPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,7 @@ void DiscoveryImplPlatform::HandleDnssdInit(void * context, CHIP_ERROR initError
publisher->mState = State::kInitialized;

// Post an event that will start advertising
DeviceLayer::ChipDeviceEvent event;
event.Type = DeviceLayer::DeviceEventType::kDnssdInitialized;
DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kDnssdInitialized };

CHIP_ERROR error = DeviceLayer::PlatformMgr().PostEvent(&event);
if (error != CHIP_NO_ERROR)
Expand All @@ -477,9 +476,8 @@ void DiscoveryImplPlatform::HandleDnssdError(void * context, CHIP_ERROR error)
// Restore dnssd state before restart, also needs to call ChipDnssdShutdown()
publisher->Shutdown();

DeviceLayer::ChipDeviceEvent event;
event.Type = DeviceLayer::DeviceEventType::kDnssdRestartNeeded;
error = DeviceLayer::PlatformMgr().PostEvent(&event);
DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kDnssdRestartNeeded };
error = DeviceLayer::PlatformMgr().PostEvent(&event);

if (error != CHIP_NO_ERROR)
{
Expand Down
3 changes: 1 addition & 2 deletions src/protocols/secure_channel/PairingSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ void PairingSession::Finish()
if (err == CHIP_NO_ERROR)
{
VerifyOrDie(mSecureSessionHolder);
DeviceLayer::ChipDeviceEvent event;
event.Type = DeviceLayer::DeviceEventType::kSecureSessionEstablished;
DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kSecureSessionEstablished };
event.SecureSessionEstablished.TransportType = to_underlying(address.GetTransportType());
event.SecureSessionEstablished.SecureSessionType =
to_underlying(mSecureSessionHolder->AsSecureSession()->GetSecureSessionType());
Expand Down
Loading