softoff: support host transition state

State management recently introduced transition states. See the
following for more information:
https://github.com/openbmc/phosphor-dbus-interfaces/commit/9f65dfeaa5ab22cae03db45c9916868da9864f83

Both the pldm soft off service and the new service which sets the host
transition state run at the same time. If the state service runs
first then the pldm soft off code incorrectly skips running.

We could make an After relationship with the service but since it's a
defined API, lets just handle in software with this commit.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I55515ff78f0406cba1dcb946173deeb0fcb98d34
diff --git a/softoff/softoff.cpp b/softoff/softoff.cpp
index 939d0e0..890b4af 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -82,8 +82,10 @@
                 "/xyz/openbmc_project/state/host0", "CurrentHostState",
                 "xyz.openbmc_project.State.Host");
 
-        if (std::get<std::string>(propertyValue) !=
-            "xyz.openbmc_project.State.Host.HostState.Running")
+        if ((std::get<std::string>(propertyValue) !=
+             "xyz.openbmc_project.State.Host.HostState.Running") &&
+            (std::get<std::string>(propertyValue) !=
+             "xyz.openbmc_project.State.Host.HostState.TransitioningToOff"))
         {
             // Host state is not "Running", this app should return success
             completed = true;