Fix compilation of nbd_proxy.hpp
Fixes compilation errors after introducing
* 7772638ea777820234e6004ee63dc558e629e35e Remove AsyncResp from
openHandler
* b9d36b4791d77a47e1f3c5c4564fcdf7cc68c115 Consistently use
dbus::utility types
Tested:
When nbd_proxy is enabled, code compiles.
Change-Id: I6422bbcb7086a8ebc6cc48c7c72636afd1e3ac21
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 9f46c03..7b765e2 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -258,9 +258,9 @@
.onopen([](crow::websocket::Connection& conn) {
BMCWEB_LOG_DEBUG << "nbd-proxy.onopen(" << &conn << ")";
- auto getUserInfoHandler = [&conn, asyncResp](
+ auto getUserInfoHandler = [&conn](
const boost::system::error_code ec,
- const dbus::utilities::
+ const dbus::utility::
DBusPropertiesMap& userInfo) {
if (ec)
{
@@ -270,7 +270,9 @@
}
const std::string* userRolePtr = nullptr;
- auto userInfoIter = userInfo.find("UserPrivilege");
+ auto userInfoIter = std::find_if(
+ userInfo.begin(), userInfo.end(),
+ [](const auto& p) { return p.first == "UserPrivilege"; });
if (userInfoIter != userInfo.end())
{
userRolePtr =
@@ -300,7 +302,7 @@
return;
}
- auto openHandler = [&conn, asyncResp](
+ auto openHandler = [&conn](
const boost::system::error_code ec,
const dbus::utility::ManagedObjectType&
objects) {