From 56b73e2088e617cb90f403dc64f27f329ef048b5 Mon Sep 17 00:00:00 2001 From: Nivedita Sarkar Date: Thu, 9 Nov 2023 15:41:49 -0800 Subject: [PATCH] Remove commented lines of code --- .../diagnostic-logs-server/diagnostic-logs-server.cpp | 8 +++----- .../diagnostic-logs-server/diagnostic-logs-server.h | 2 +- .../Framework/CHIP/MTRDiagnosticLogsTransferHandler.h | 2 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp index 19cdad18e6db45..15e5b696e7af19 100644 --- a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp +++ b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp @@ -137,7 +137,7 @@ void DiagnosticLogsServer::HandleBDXResponse(CHIP_ERROR error) } else { - SendErrorResponseAndReset(commandHandle, mRequestPath, StatusEnum::kNoLogs); + SendErrorResponse(commandHandle, mRequestPath, StatusEnum::kNoLogs); } } @@ -147,8 +147,8 @@ void DiagnosticLogsServer::SetAsyncCommandHandleAndPath(CommandHandler * command mRequestPath = commandPath; } -void DiagnosticLogsServer::SendErrorResponseAndReset(chip::app::CommandHandler * commandHandler, - chip::app::ConcreteCommandPath path, StatusEnum status) +void DiagnosticLogsServer::SendErrorResponse(chip::app::CommandHandler * commandHandler, chip::app::ConcreteCommandPath path, + StatusEnum status) { Commands::RetrieveLogsResponse::Type response; if (commandHandler != nullptr) @@ -156,8 +156,6 @@ void DiagnosticLogsServer::SendErrorResponseAndReset(chip::app::CommandHandler * response.status = status; commandHandler->AddResponse(path, response); } - // mDiagnosticLogsBDXTransferHandler->Reset(); - // delete(mDiagnosticLogsBDXTransferHandler); } #endif diff --git a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h index ffec67fed78bc4..f62edc1ba6d12f 100644 --- a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h +++ b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.h @@ -71,7 +71,7 @@ class DiagnosticLogsServer bool IsBDXProtocolRequested(TransferProtocolEnum requestedProtocol); - void SendErrorResponseAndReset(chip::app::CommandHandler * commandHandler, chip::app::ConcreteCommandPath path, + void SendErrorResponse(chip::app::CommandHandler * commandHandler, chip::app::ConcreteCommandPath path, StatusEnum status); #endif diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.h b/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.h index bbb04a125999fc..df75e925d741fb 100644 --- a/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.h +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsTransferHandler.h @@ -82,6 +82,4 @@ class MTRDiagnosticLogsTransferHandler : public chip::bdx::Responder { NSFileHandle * _Nullable mFileHandle; std::function mCallback; - - bool mInitialized = false; };