diff --git a/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h b/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h index 1af25363c3f862..41276619538852 100644 --- a/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h +++ b/examples/all-clusters-app/linux/include/diagnostic-logs-provider-delegate-impl.h @@ -56,7 +56,7 @@ class LogProvider : public LogProviderDelegate ~LogProvider(){}; - static inline LogProvider & getLogProvider() { return sInstance; } + static inline LogProvider & GetInstance() { return sInstance; } private: Optional GetLogFilePath(IntentEnum logType); diff --git a/src/app/bdx/DiagnosticLogsBDXTransferHandler.cpp b/src/app/bdx/DiagnosticLogsBDXTransferHandler.cpp index b81bd0c8bf5c01..106b862bfe50e8 100644 --- a/src/app/bdx/DiagnosticLogsBDXTransferHandler.cpp +++ b/src/app/bdx/DiagnosticLogsBDXTransferHandler.cpp @@ -102,7 +102,7 @@ void DiagnosticLogsBDXTransferHandler::HandleBDXError(CHIP_ERROR error) VerifyOrReturn(error != CHIP_NO_ERROR); LogErrorOnFailure(error); - // If Send Accept was not received, send a response with status Denied to the RetreiveLogRequest + // If Send Accept was not received, send a response with status Denied to the RetrieveLogsRequest if (!mIsAcceptReceived) { DiagnosticLogsServer::Instance().SendCommandResponse(StatusEnum::kDenied); @@ -176,7 +176,7 @@ void DiagnosticLogsBDXTransferHandler::HandleTransferSessionOutput(TransferSessi mTransfer.AbortTransfer(GetBdxStatusCodeFromChipError(CHIP_ERROR_INCORRECT_STATE)); return; } - // Send a response with status Success to the RetreiveLogRequest, since we got a SendAccept message. + // Send a response with status Success to the RetrieveLogsRequest, since we got a SendAccept message. DiagnosticLogsServer::Instance().SendCommandResponse(StatusEnum::kSuccess); [[fallthrough]]; diff --git a/src/app/bdx/DiagnosticLogsBDXTransferHandler.h b/src/app/bdx/DiagnosticLogsBDXTransferHandler.h index c5aee688625818..f7f5e2e8296f0d 100644 --- a/src/app/bdx/DiagnosticLogsBDXTransferHandler.h +++ b/src/app/bdx/DiagnosticLogsBDXTransferHandler.h @@ -48,8 +48,8 @@ class DiagnosticLogsBDXTransferHandler : public bdx::Initiator * It starts the BDX transfer session by calling InitiateTransfer of the which sends the SendInit BDX message * to the log requestor. * - * @param[in] exchangeMgr The exchange manager from the command handler object for the RetreiveLogRequest command - * @param[in] sessionHandle The session handle from the command handler object for the RetreiveLogRequest command + * @param[in] exchangeMgr The exchange manager from the command handler object for the RetrieveLogsRequest command + * @param[in] sessionHandle The session handle from the command handler object for the RetrieveLogsRequest command * @param[in] fabricIndex The fabric index of the requestor * @param[in] peerNodeId The node id of the requestor * @param[in] delegate The log provider delegate that will provide the log chunks 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 c8c812d68c0cab..91c7d348c3d8a3 100644 --- a/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp +++ b/src/app/clusters/diagnostic-logs-server/diagnostic-logs-server.cpp @@ -59,7 +59,7 @@ bool IsLogProviderDelegateNull(LogProviderDelegate * logProviderDelegate, Endpoi return false; } -} // namespace +} // anonymous namespace DiagnosticLogsServer DiagnosticLogsServer::sInstance; @@ -97,7 +97,7 @@ CHIP_ERROR DiagnosticLogsServer::HandleLogRequestForBDXProtocol(Messaging::Excha VerifyOrReturnError(exchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); mIntent = intent; - auto scopedPeerNodeId = ScopedNodeId(); + ScopedNodeId scopedPeerNodeId; if (exchangeCtx->HasSessionHandle()) { auto sessionHandle = exchangeCtx->GetSessionHandle(); @@ -193,7 +193,7 @@ void DiagnosticLogsServer::HandleLogRequestForResponsePayload(CommandHandler * c bool isEOF = false; - // Get the log chunk of size kMaxLogContentSize to send in the response payload. + // Get the log chunk of size up to kMaxLogContentSize to send in the response payload. CHIP_ERROR err = logProviderDelegate->GetNextChunk(mLogSessionHandle, mutableBuffer, isEOF); if (err != CHIP_NO_ERROR) diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticsLogDownloadTask.h b/src/darwin/Framework/CHIP/MTRDiagnosticsLogDownloadTask.h index af3247651f0a83..ccdffe2e20789d 100644 --- a/src/darwin/Framework/CHIP/MTRDiagnosticsLogDownloadTask.h +++ b/src/darwin/Framework/CHIP/MTRDiagnosticsLogDownloadTask.h @@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN /** - * This class handles the task downloading a log file requested by the MTRDevice. It creates a new + * This class handles downloading a log file requested by the MTRDevice. It creates a new * MTRDiagnosticsLogTransferHandler to prepare for the BDX transfer session and handle the BDX * messages and transfer events and downloads the file. * diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index dc75fe746995ed..325716dd300f14 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -2717,7 +2717,7 @@ - (void)test029_DownloadEndUserSupportLog_NoTimeout dispatch_after(dispatch_time(DISPATCH_TIME_NOW, kDownloadLogDelayTimeoutInSeconds * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self testDownloadLogOfType:MTRDiagnosticLogTypeEndUserSupport timeout:0 logFilePath:outFile logFileSize:(10 * 1024) expectation:expectation]; }); - [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:(kDownloadLogTimeoutInSeconds + kDownloadLogDelayTimeoutInSeconds)]; + [self waitForExpectations:@[ expectation ] timeout:(kDownloadLogTimeoutInSeconds + kDownloadLogDelayTimeoutInSeconds)]; } - (void)test030_DownloadNetworkDiagnosticsLog_NoTimeout @@ -2730,7 +2730,7 @@ - (void)test030_DownloadNetworkDiagnosticsLog_NoTimeout dispatch_after(dispatch_time(DISPATCH_TIME_NOW, kDownloadLogDelayTimeoutInSeconds * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self testDownloadLogOfType:MTRDiagnosticLogTypeNetworkDiagnostics timeout:0 logFilePath:outFile logFileSize:(4 * 1024) expectation:expectation]; }); - [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:(kDownloadLogTimeoutInSeconds + kDownloadLogDelayTimeoutInSeconds)]; + [self waitForExpectations:@[ expectation ] timeout:(kDownloadLogTimeoutInSeconds + kDownloadLogDelayTimeoutInSeconds)]; } - (void)test031_DownloadCrashLog_NoTimeout @@ -2743,7 +2743,7 @@ - (void)test031_DownloadCrashLog_NoTimeout dispatch_after(dispatch_time(DISPATCH_TIME_NOW, kDownloadLogDelayTimeoutInSeconds * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ [self testDownloadLogOfType:MTRDiagnosticLogTypeCrash timeout:0 logFilePath:outFile logFileSize:(3 * 1024) expectation:expectation]; }); - [self waitForExpectations:[NSArray arrayWithObject:expectation] timeout:(kDownloadLogTimeoutInSeconds + kDownloadLogDelayTimeoutInSeconds)]; + [self waitForExpectations:@[ expectation ] timeout:(kDownloadLogTimeoutInSeconds + kDownloadLogDelayTimeoutInSeconds)]; } - (void)test900_SubscribeAllAttributes