quiesce: use entry id for interface

Extension code does not have the Entry object as an input parameter. The
quiesce interface should not require an Entry object. Refactor the code
a bit to allow for this.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5caee881dae3d6c22f4f619af5acd3e3e33379aa
diff --git a/log_manager.cpp b/log_manager.cpp
index bcc94a5..c8c6cc5 100644
--- a/log_manager.cpp
+++ b/log_manager.cpp
@@ -233,9 +233,9 @@
                                      std::move(objects), fwVersion, *this);
     serialize(*e);
 
-    if (isQuiesceOnErrorEnabled())
+    if (isQuiesceOnErrorEnabled() && isCalloutPresent(*e))
     {
-        checkQuiesceOnError(*e);
+        quiesceOnError(entryId);
     }
 
     doExtensionLogCreate(*e, ffdc);
@@ -369,26 +369,20 @@
     this->busLog.call_noreply(quiesce);
 }
 
-void Manager::checkQuiesceOnError(const Entry& entry)
+void Manager::quiesceOnError(const uint32_t entryId)
 {
 
-    if (!isCalloutPresent(entry))
-    {
-        return;
-    }
-
     logging::log<logging::level::INFO>(
         "QuiesceOnError set and callout present");
 
     auto blockPath =
-        std::string(OBJ_LOGGING) + "/block" + std::to_string(entry.id());
-    auto blockObj =
-        std::make_unique<Block>(this->busLog, blockPath, entry.id());
+        std::string(OBJ_LOGGING) + "/block" + std::to_string(entryId);
+    auto blockObj = std::make_unique<Block>(this->busLog, blockPath, entryId);
     this->blockingErrors.push_back(std::move(blockObj));
 
     // Register call back if log is resolved
     using namespace sdbusplus::bus::match::rules;
-    auto entryPath = std::string(OBJ_ENTRY) + '/' + std::to_string(entry.id());
+    auto entryPath = std::string(OBJ_ENTRY) + '/' + std::to_string(entryId);
     auto callback = std::make_unique<sdbusplus::bus::match::match>(
         this->busLog,
         propertiesChanged(entryPath, "xyz.openbmc_project.Logging.Entry"),
@@ -396,7 +390,7 @@
                   std::placeholders::_1));
 
     propChangedEntryCallback.insert(
-        std::make_pair(entry.id(), std::move(callback)));
+        std::make_pair(entryId, std::move(callback)));
 
     checkAndQuiesceHost();
 }