summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-02-17 02:42:37 +0300
committerEd Tanous <edtanous@google.com>2022-07-01 19:27:45 +0300
commite3009e4645d3a4ecaf2e65f75c6b997a5ed5dbfb (patch)
tree8f8518540ba2071055baebb8eb98ad5c972d68fb
parentf970c357932621db3dfd16818b8f471758dcb4c4 (diff)
downloadbmcweb-e3009e4645d3a4ecaf2e65f75c6b997a5ed5dbfb.tar.xz
Make nbd-proxy header build in all cases
We very intentionally don't do this "only include header if option is enabled" thing to make sure that compile issues are seen across all builds. Tested: Code compiles. Header changes only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I749aed62ed6cd73690f3d89d75df65bec77562c2
-rw-r--r--include/nbd_proxy.hpp6
-rw-r--r--src/webserver_main.cpp5
2 files changed, 4 insertions, 7 deletions
diff --git a/include/nbd_proxy.hpp b/include/nbd_proxy.hpp
index 4431662d1a..ac3a8113c1 100644
--- a/include/nbd_proxy.hpp
+++ b/include/nbd_proxy.hpp
@@ -302,15 +302,15 @@ inline void requestRoutes(App& app)
}
auto openHandler =
- [&conn](const boost::system::error_code ec,
+ [&conn](const boost::system::error_code ec2,
const dbus::utility::ManagedObjectType& objects) {
const std::string* socketValue = nullptr;
const std::string* endpointValue = nullptr;
const std::string* endpointObjectPath = nullptr;
- if (ec)
+ if (ec2)
{
- BMCWEB_LOG_ERROR << "DBus error: " << ec.message();
+ BMCWEB_LOG_ERROR << "DBus error: " << ec2.message();
conn.close("Failed to create mount point");
return;
}
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index f49b25d0ce..ff0bbd7420 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -12,6 +12,7 @@
#include <image_upload.hpp>
#include <kvm_websocket.hpp>
#include <login_routes.hpp>
+#include <nbd_proxy.hpp>
#include <obmc_console.hpp>
#include <openbmc_dbus_rest.hpp>
#include <redfish.hpp>
@@ -27,10 +28,6 @@
#include <memory>
#include <string>
-#ifdef BMCWEB_ENABLE_VM_NBDPROXY
-#include <nbd_proxy.hpp>
-#endif
-
constexpr int defaultPort = 18080;
inline void setupSocket(crow::App& app)