From 8e8245db1812bb0ec294a1c9a97c3a65558840ed Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Thu, 11 Apr 2024 22:21:38 -0700 Subject: Fix nullptr failures for image upload Several places that call *req.ioService were missing nullptr checks. Add them, and fix the one case where it might not be filled in. Tested: With HTTP2 enabled, the following command succeeds. ``` curl -k https://192.168.7.2/redfish/v1/UpdateService/update -F 'UpdateParameters={"Targets":["/redfish/v1/Managers/bmc"]} ;type=application/json' --user "root:0penBmc" -F UpdateFile=@/home/ed/bmcweb/16mb.txt -v -H "Expect:" ``` Change-Id: I81e7944c22f5922d461bf5d231086c7468a16e62 Signed-off-by: Ed Tanous --- http/http2_connection.hpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'http') diff --git a/http/http2_connection.hpp b/http/http2_connection.hpp index d5f4481700..3e0c3943d5 100644 --- a/http/http2_connection.hpp +++ b/http/http2_connection.hpp @@ -246,6 +246,8 @@ class HTTP2Connection : } } crow::Request& thisReq = it->second.req; + thisReq.ioService = static_cast( + &adaptor.get_executor().context()); BMCWEB_LOG_DEBUG("Handling {} \"{}\"", logPtr(&thisReq), thisReq.url().encoded_path()); -- cgit v1.2.3