Change location of MSL error

The prev_entry() functionality that was being used to pass meta
data was not performing as expected. To make sure all the
desired information is passed to the event logs. This is done
by reporting directly from the msl_verify.cpp file where the
information is then directly reported.

Signed-off-by: Zami Seck <zimzam17@gmail.com>
Change-Id: I4c4a41a104db9dcf303914b4a5e4e43908082414
diff --git a/activation.cpp b/activation.cpp
index e057814..bfcd546 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -110,15 +110,6 @@
 
         if (!minimum_ship_level::verify(versionStr))
         {
-            using IncompatibleErr = sdbusplus::xyz::openbmc_project::Software::
-                Version::Error::Incompatible;
-            using Incompatible =
-                xyz::openbmc_project::Software::Version::Incompatible;
-
-            report<IncompatibleErr>(
-                prev_entry<Incompatible::MIN_VERSION>(),
-                prev_entry<Incompatible::ACTUAL_VERSION>(),
-                prev_entry<Incompatible::VERSION_PURPOSE>());
             return softwareServer::Activation::activation(
                 softwareServer::Activation::Activations::Failed);
         }
diff --git a/msl_verify.cpp b/msl_verify.cpp
index b74f6e9..fd1fccd 100644
--- a/msl_verify.cpp
+++ b/msl_verify.cpp
@@ -4,8 +4,10 @@
 
 #include "version.hpp"
 
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
 #include <phosphor-logging/lg2.hpp>
-#include <xyz/openbmc_project/Software/Version/server.hpp>
+#include <xyz/openbmc_project/Software/Version/error.hpp>
 
 #include <regex>
 
@@ -83,12 +85,21 @@
     auto rc = compare(actualVersion, mslVersion);
     if (rc < 0)
     {
-        auto purpose = sdbusplus::xyz::openbmc_project::Software::server::
-            Version::VersionPurpose::BMC;
+        using namespace phosphor::logging;
+        using IncompatibleErr = sdbusplus::xyz::openbmc_project::Software::
+            Version::Error::Incompatible;
+        using Incompatible =
+            xyz::openbmc_project::Software::Version::Incompatible;
+        std::string purpose =
+            "xyz.openbmc_project.Software.Version.VersionPurpose.BMC";
+
         error(
             "BMC Minimum Ship Level ({MIN_VERSION}) NOT met by {ACTUAL_VERSION}",
             "MIN_VERSION", msl, "ACTUAL_VERSION", tmpStr, "VERSION_PURPOSE",
             purpose);
+        report<IncompatibleErr>(Incompatible::MIN_VERSION(msl.c_str()),
+                                Incompatible::ACTUAL_VERSION(tmpStr.c_str()),
+                                Incompatible::VERSION_PURPOSE(purpose.c_str()));
         return false;
     }