summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-05-07 00:57:13 +0300
committerEd Tanous <ed@tanous.net>2024-05-09 02:32:22 +0300
commitc72503f3fc356ff5c983c7202c66623179b275dc (patch)
treef4f900a31fa2c9bafd1205a08c602fdb99a2896b
parent80ba22fadc25f3831d7073d5aa9e913257cd1d9d (diff)
downloadbmcweb-c72503f3fc356ff5c983c7202c66623179b275dc.tar.xz
Fix TFTP merge conflict
Static analysis now shows this code as "dead", even though it's not. This is a merge conflict that was handled wrong. Tested: inspection only. Suspect TFTP will now work. Change-Id: I51e52d62c51b251baf4c6ae74b100c1eda95603d Signed-off-by: Ed Tanous <ed@tanous.net>
-rw-r--r--redfish-core/lib/update_service.hpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 2a40f8afed..0d424dbb60 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -538,11 +538,12 @@ inline void doTftpUpdate(const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
const boost::urls::url_view_base& url)
{
-#ifndef BMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE
- messages::actionParameterNotSupported(asyncResp->res, "ImageURI",
- url.buffer());
- return;
-#endif
+ if (!BMCWEB_INSECURE_TFTP_UPDATE)
+ {
+ messages::actionParameterNotSupported(asyncResp->res, "ImageURI",
+ url.buffer());
+ return;
+ }
std::string path(url.encoded_path());
if (path.size() < 2)