summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2019-03-06 09:24:55 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-03-07 14:40:50 +0000
commit64a350d3214e8bb9b43c1ff4d49b29ad38ad0d04 (patch)
tree0a369925f4178926beffc22bace5d8ca796ec98f
parent30206dbaa6eb0cbddd7e215339f8a112ca011d6a (diff)
downloadphosphor-host-ipmid-64a350d3214e8bb9b43c1ff4d49b29ad38ad0d04.zip
phosphor-host-ipmid-64a350d3214e8bb9b43c1ff4d49b29ad38ad0d04.tar.gz
fix whitelist RestrictionMode lookup
The whitelist RestrictionMode lookup was missing the interface name on the properties get method call. This is a fixup for that. Tested-by: watch ipmid startup and see that it does not complain about fetching the whitelist setting. Change-Id: I030c0c66771afcb987e0679595a2d662f7c3ea9e Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
-rw-r--r--whitelist-filter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/whitelist-filter.cpp b/whitelist-filter.cpp
index 6fe0f3e..3b45db8 100644
--- a/whitelist-filter.cpp
+++ b/whitelist-filter.cpp
@@ -6,6 +6,7 @@
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/log.hpp>
#include <settings.hpp>
+#include <utils.hpp>
#include <xyz/openbmc_project/Control/Security/RestrictionMode/server.hpp>
using namespace phosphor::logging;
@@ -81,7 +82,7 @@ void WhitelistFilter::cacheRestrictedMode()
return;
}
bus->async_method_call(
- [this](boost::system::error_code ec, std::string mode) {
+ [this](boost::system::error_code ec, ipmi::Value v) {
if (ec)
{
log<level::ERR>("Error in RestrictionMode Get");
@@ -89,6 +90,7 @@ void WhitelistFilter::cacheRestrictedMode()
restrictedMode = true;
return;
}
+ auto mode = std::get<std::string>(v);
auto restrictionMode =
RestrictionMode::convertModesFromString(mode);
restrictedMode =
@@ -96,8 +98,9 @@ void WhitelistFilter::cacheRestrictedMode()
log<level::INFO>((restrictedMode ? "Set restrictedMode = true"
: "Set restrictedMode = false"));
},
- restrictionModeService.c_str(), restrictionModeSetting.c_str(),
- "org.freedesktop.DBus.Properties", "Get", "RestrictionMode");
+ restrictionModeService, restrictionModeSetting,
+ "org.freedesktop.DBus.Properties", "Get", restrictionModeIntf,
+ "RestrictionMode");
}
void WhitelistFilter::handleRestrictedModeChange(sdbusplus::message::message& m)
OpenPOWER on IntegriCloud