Skip to content

Commit

Permalink
[Fabric-Admin] Cleanup extra override method (project-chip#36109)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufengwangca authored Oct 17, 2024
1 parent 190c5c8 commit d7f99c7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
30 changes: 15 additions & 15 deletions examples/fabric-admin/device_manager/DeviceSynchronization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,23 +239,23 @@ void DeviceSynchronizer::GetUniqueId()
auto remoteBridgeNodeId = DeviceMgr().GetRemoteBridgeNodeId();
EndpointId remoteEndpointIdOfInterest = device->GetEndpointId();

ChipLogDetail(NotSpecified, "Attempting to get UniqueId from remote Fabric Sync Aggregator") CHIP_ERROR err =
mUniqueIdGetter.GetUniqueId(
[this](std::optional<CharSpan> aUniqueId) {
if (aUniqueId.has_value())
{
ChipLogDetail(NotSpecified, "Attempting to get UniqueId from remote Fabric Sync Aggregator");
CHIP_ERROR err = mUniqueIdGetter.GetUniqueId(
[this](std::optional<CharSpan> aUniqueId) {
if (aUniqueId.has_value())
{
#if defined(PW_RPC_ENABLED)
this->mCurrentDeviceData.has_unique_id = true;
memcpy(this->mCurrentDeviceData.unique_id, aUniqueId.value().data(), aUniqueId.value().size());
this->mCurrentDeviceData.has_unique_id = true;
memcpy(this->mCurrentDeviceData.unique_id, aUniqueId.value().data(), aUniqueId.value().size());
#endif
}
else
{
ChipLogError(NotSpecified, "We expected to get UniqueId from remote Fabric Sync Aggregator, but failed");
}
this->SynchronizationCompleteAddDevice();
},
*mController, remoteBridgeNodeId, remoteEndpointIdOfInterest);
}
else
{
ChipLogError(NotSpecified, "We expected to get UniqueId from remote Fabric Sync Aggregator, but failed");
}
this->SynchronizationCompleteAddDevice();
},
*mController, remoteBridgeNodeId, remoteEndpointIdOfInterest);

if (err == CHIP_NO_ERROR)
{
Expand Down
5 changes: 0 additions & 5 deletions examples/fabric-admin/device_manager/UniqueIdGetter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,6 @@ void UniqueIdGetter::OnAttributeData(const ConcreteDataAttributePath & path, TLV
}
}

void UniqueIdGetter::OnReportEnd()
{
// We will call mOnDoneCallback in OnDone.
}

void UniqueIdGetter::OnError(CHIP_ERROR error)
{
ChipLogProgress(NotSpecified, "Error Getting UID: %" CHIP_ERROR_FORMAT, error.Format());
Expand Down
1 change: 0 additions & 1 deletion examples/fabric-admin/device_manager/UniqueIdGetter.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class UniqueIdGetter : public chip::app::ReadClient::Callback
///////////////////////////////////////////////////////////////
void OnAttributeData(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data,
const chip::app::StatusIB & status) override;
void OnReportEnd() override;
void OnError(CHIP_ERROR error) override;
void OnDone(chip::app::ReadClient * apReadClient) override;

Expand Down

0 comments on commit d7f99c7

Please sign in to comment.