Skip to content

Commit

Permalink
Update log text
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Jun 6, 2024
1 parent c0274c2 commit e3be293
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,11 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co
needRevert = false;

// We might have a new operational identity, so we should start advertising it right away.
LogErrorOnFailure(app::DnssdServer::Instance().AdvertiseOperational());
err = app::DnssdServer::Instance().AdvertiseOperational();
if (err != CHIP_NO_ERROR)
{
ChipLogError(AppServer, "Operational advertising failed: %" CHIP_ERROR_FORMAT, err.Format());
}

// Notify the attributes containing fabric metadata can be read with new data
MatterReportingAttributeChangeCallback(commandPath.mEndpointId, OperationalCredentials::Id,
Expand Down
11 changes: 9 additions & 2 deletions src/app/server/CommissioningWindowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ void CommissioningWindowManager::OnPlatformEvent(const DeviceLayer::ChipDeviceEv
}
else if (event->Type == DeviceLayer::DeviceEventType::kOperationalNetworkEnabled)
{
LogErrorOnFailure(app::DnssdServer::Instance().AdvertiseOperational());
ChipLogProgress(AppServer, "Operational advertising enabled");
CHIP_ERROR err = app::DnssdServer::Instance().AdvertiseOperational();
if (err != CHIP_NO_ERROR)
{
ChipLogError(AppServer, "Operational advertising failed: %" CHIP_ERROR_FORMAT, err.Format());
}
else
{
ChipLogProgress(AppServer, "Operational advertising enabled");
}
}
#if CONFIG_NETWORK_LAYER_BLE
else if (event->Type == DeviceLayer::DeviceEventType::kCloseAllBleConnections)
Expand Down

0 comments on commit e3be293

Please sign in to comment.