From 2d88a17365cce6abcd573f7b8fd0cb6cbfedf00f Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 7 Aug 2024 21:25:23 +0000 Subject: [PATCH] Self-review fixes --- examples/fabric-admin/rpc/RpcClient.cpp | 4 ++-- .../fabric-bridge-common/src/BridgedDevice.cpp | 1 - examples/fabric-bridge-app/linux/RpcClient.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/fabric-admin/rpc/RpcClient.cpp b/examples/fabric-admin/rpc/RpcClient.cpp index cc1284b2cf2b68..a61a79cffffa28 100644 --- a/examples/fabric-admin/rpc/RpcClient.cpp +++ b/examples/fabric-admin/rpc/RpcClient.cpp @@ -105,7 +105,7 @@ void OnRemoveDeviceResponseCompleted(const pw_protobuf_Empty & response, pw::Sta } } -void GenericResponseCompletedWithNoParameters(const pw_protobuf_Empty & response, pw::Status status) +void RpcCompletedWithEmptyResponse(const pw_protobuf_Empty & response, pw::Status status) { std::lock_guard lock(responseMutex); responseReceived = true; @@ -180,7 +180,7 @@ CHIP_ERROR ActiveChanged(chip::NodeId nodeId, uint32_t promisedActiveDuration) // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler // function and the call will complete. - auto call = fabricBridgeClient.ActiveChanged(parameters, GenericResponseCompletedWithNoParameters); + auto call = fabricBridgeClient.ActiveChanged(parameters, RpcCompletedWithEmptyResponse); if (!call.active()) { diff --git a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp index 63787ed15725df..9d6a1b3c77eb13 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp +++ b/examples/fabric-bridge-app/fabric-bridge-common/src/BridgedDevice.cpp @@ -40,7 +40,6 @@ static void ActiveChangeEventWork(intptr_t arg) event.promisedActiveDuration = data->mPromisedActiveDuration; chip::EventNumber eventNumber = 0; - // TODO DNS this is not called from Matter event loop so it will crash CHIP_ERROR err = chip::app::LogEvent(event, data->mEndpointId, eventNumber); if (err != CHIP_NO_ERROR) { diff --git a/examples/fabric-bridge-app/linux/RpcClient.cpp b/examples/fabric-bridge-app/linux/RpcClient.cpp index a5aff108e198e9..970400ae0a80e1 100644 --- a/examples/fabric-bridge-app/linux/RpcClient.cpp +++ b/examples/fabric-bridge-app/linux/RpcClient.cpp @@ -88,7 +88,7 @@ void OnOpenCommissioningWindowCompleted(const chip_rpc_OperationStatus & respons } // Callback function to be called when the RPC response is received for generic empty response. -void GenericRpcCompletedWithPwStatus(const pw_protobuf_Empty & response, pw::Status status) +void RpcCompletedWithEmptyResponse(const pw_protobuf_Empty & response, pw::Status status) { std::lock_guard lock(responseMutex); responseReceived = true; @@ -170,7 +170,7 @@ CHIP_ERROR KeepActive(chip::NodeId nodeId, uint32_t stayActiveDuration) // The RPC call is kept alive until it completes. When a response is received, it will be logged by the handler // function and the call will complete. - auto call = fabricAdminClient.KeepActive(params, GenericRpcCompletedWithPwStatus); + auto call = fabricAdminClient.KeepActive(params, RpcCompletedWithEmptyResponse); if (!call.active()) {