Return the heartbeat command if queue is empty

There are numerous valid situations where the host
interface queue may be empty, but the host has an
active SMS_ATN.  In these cases, ipmid should not log
an error and abort but instead just return a default
command.  The default will be the heartbeat command
since its basically a noop to the host.

Resolves openbmc/openbmc#1750

Change-Id: I810bb0368c2cbd4aa99b6cf20d29eeefc8b312cd
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/elog-errors.hpp b/elog-errors.hpp
deleted file mode 100644
index 1db2709..0000000
--- a/elog-errors.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// This file was autogenerated.  Do not edit!
-// See elog-gen.py for more details
-#pragma once
-
-#include <string>
-#include <tuple>
-#include <type_traits>
-#include <sdbusplus/exception.hpp>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog.hpp>
-
-
-namespace phosphor
-{
-
-namespace logging
-{
-
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Control
-{
-namespace Internal
-{
-namespace Host
-{
-namespace _QueueEmpty
-{
-
-
-}  // namespace _QueueEmpty
-
-struct QueueEmpty : public sdbusplus::exception_t
-{
-    static constexpr auto errName = "xyz.openbmc_project.Control.Internal.Host.QueueEmpty";
-    static constexpr auto errDesc = "The host response queue is empty and it should not be!";
-    static constexpr auto L = level::ERR;
-    using metadata_types = std::tuple<>;
-
-    const char* name() const noexcept
-    {
-        return errName;
-    }
-
-    const char* description() const noexcept
-    {
-        return errDesc;
-    }
-
-    const char* what() const noexcept
-    {
-        return errName;
-    }
-};
-
-} // namespace Host
-} // namespace Internal
-} // namespace Control
-} // namespace openbmc_project
-} // namespace xyz
-
-} // namespace logging
-
-} // namespace phosphor
diff --git a/host-interface.cpp b/host-interface.cpp
index be2bd99..0bce888 100644
--- a/host-interface.cpp
+++ b/host-interface.cpp
@@ -3,7 +3,6 @@
 #include <utils.hpp>
 #include <config.h>
 #include "host-interface.hpp"
-#include "elog-errors.hpp"
 
 namespace phosphor
 {
@@ -31,8 +30,10 @@
 
     if(this->workQueue.empty())
     {
-        log<level::ERR>("Control Host work queue is empty!");
-        elog<xyz::openbmc_project::Control::Internal::Host::QueueEmpty>();
+        // Just return a heartbeat in this case.  A spurious SMS_ATN was
+        // asserted for the host (probably from a previous boot).
+        log<level::INFO>("Control Host work queue is empty!");
+        return (Command::Heartbeat);
     }
 
     // Pop the processed entry off the queue
diff --git a/xyz/openbmc_project/Control/Internal/Host.errors.yaml b/xyz/openbmc_project/Control/Internal/Host.errors.yaml
deleted file mode 100644
index 3c14863..0000000
--- a/xyz/openbmc_project/Control/Internal/Host.errors.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: QueueEmpty
-  description: The host response queue is empty and it should not be!
-
diff --git a/xyz/openbmc_project/Control/Internal/Host.metadata.yaml b/xyz/openbmc_project/Control/Internal/Host.metadata.yaml
deleted file mode 100644
index 3f0b852..0000000
--- a/xyz/openbmc_project/Control/Internal/Host.metadata.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-- name: QueueEmpty
-  level: ERR
-