Persist changes to 'Resolved' property
When an error is marked resolved, serialize and persist the changed
'Resolved' property.
Change-Id: I922af84cbb826e1e43a0f0c99740868222ccb1fe
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/elog_entry.cpp b/elog_entry.cpp
index 07a2854..74fcc4b 100644
--- a/elog_entry.cpp
+++ b/elog_entry.cpp
@@ -1,5 +1,6 @@
#include "elog_entry.hpp"
#include "log_manager.hpp"
+#include "elog_serialize.hpp"
namespace phosphor
{
@@ -13,5 +14,22 @@
parent.erase(id());
}
+bool Entry::resolved(bool value)
+{
+ auto current = sdbusplus::xyz::openbmc_project::
+ Logging::server::Entry::resolved();
+ if (value != current)
+ {
+ value ?
+ associations({}) :
+ associations(assocs);
+ current = sdbusplus::xyz::openbmc_project::
+ Logging::server::Entry::resolved(value);
+ serialize(*this);
+ }
+
+ return current;
+}
+
} // namespace logging
} // namepsace phosphor