diff options
author | Ed Tanous <ed@tanous.net> | 2024-03-28 10:35:13 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-04-01 19:06:10 +0300 |
commit | 93cf0ac2c7921d3344fa112f667c47a838e3b7d6 (patch) | |
tree | baf607a094de6dd4dd165e29b50c81085f6d059d /redfish-core/include | |
parent | 06fc9bebd8c9146636b53f2a04d340230bf21e29 (diff) | |
download | bmcweb-93cf0ac2c7921d3344fa112f667c47a838e3b7d6.tar.xz |
Fix SSE sockets
Redfish protocol validatator has SSE tests that expose some bad coding
practies in SSE handlers, namely, that there are several cases where we
don't check for nullptr.
Fix them.
This appears to have been introduced in:
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/41319
Tested: Redfish service validator passes more tests.
Change-Id: Id980725f007d044b7d120dbe0f4b625865cab6ba
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'redfish-core/include')
-rw-r--r-- | redfish-core/include/event_service_manager.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp index cac6b8b2b2..679c4f6918 100644 --- a/redfish-core/include/event_service_manager.hpp +++ b/redfish-core/include/event_service_manager.hpp @@ -532,6 +532,11 @@ class Subscription : public persistent_data::UserSubscription void updateRetryConfig(uint32_t retryAttempts, uint32_t retryTimeoutInterval) { + if (policy == nullptr) + { + BMCWEB_LOG_DEBUG("Retry policy was nullptr, ignoring set"); + return; + } policy->maxRetryAttempts = retryAttempts; policy->retryIntervalSecs = std::chrono::seconds(retryTimeoutInterval); } |