|
| 1 | +From 92f9e7d0d746087ff4c6b0d86b80f7deba661d5d Mon Sep 17 00:00:00 2001 |
| 2 | +From: Stefan Agner <stefan@agner.ch> |
| 3 | +Date: Thu, 13 Jun 2024 16:13:56 +0200 |
| 4 | +Subject: [PATCH] Remove unnecessary error log from CurrentFabricRemover |
| 5 | + (#33896) |
| 6 | + |
| 7 | +* Remove unnecessary error log from CurrentFabricRemover |
| 8 | + |
| 9 | +Currently, when the CurrentFabricRemover is successful it logs the |
| 10 | +following error with err log level: |
| 11 | + |
| 12 | +Remove Current Fabric Result : src/controller/CurrentFabricRemover.cpp:133: Success |
| 13 | + |
| 14 | +Get rid of the message if successful, it is confusing. |
| 15 | + |
| 16 | +* Add braces to if statement |
| 17 | +--- |
| 18 | + src/controller/CurrentFabricRemover.cpp | 5 ++++- |
| 19 | + 1 file changed, 4 insertions(+), 1 deletion(-) |
| 20 | + |
| 21 | +diff --git a/src/controller/CurrentFabricRemover.cpp b/src/controller/CurrentFabricRemover.cpp |
| 22 | +index be89731b24..899860a028 100644 |
| 23 | +--- a/src/controller/CurrentFabricRemover.cpp |
| 24 | ++++ b/src/controller/CurrentFabricRemover.cpp |
| 25 | +@@ -145,7 +145,10 @@ void CurrentFabricRemover::OnCommandFailure(void * context, CHIP_ERROR err) |
| 26 | + |
| 27 | + void CurrentFabricRemover::FinishRemoveCurrentFabric(void * context, CHIP_ERROR err) |
| 28 | + { |
| 29 | +- ChipLogError(Controller, "Remove Current Fabric Result : %" CHIP_ERROR_FORMAT, err.Format()); |
| 30 | ++ if (err != CHIP_NO_ERROR) |
| 31 | ++ { |
| 32 | ++ ChipLogError(Controller, "Remove Current Fabric Failed : %" CHIP_ERROR_FORMAT, err.Format()); |
| 33 | ++ } |
| 34 | + auto * self = static_cast<CurrentFabricRemover *>(context); |
| 35 | + self->mNextStep = Step::kAcceptRemoveFabricStart; |
| 36 | + if (self->mCurrentFabricRemoveCallback != nullptr) |
| 37 | +-- |
| 38 | +2.45.2 |
| 39 | + |
0 commit comments