summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0030-Initialize-Event-Service-Config-on-bmcweb-restart.patch
blob: 60631bc3ca55517a4f9ba5562ce76fbdd6cb682b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 20f61051cc1dc68b5be2419a4ec0fdbfedf3466e Mon Sep 17 00:00:00 2001
From: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Date: Wed, 7 Oct 2020 01:45:28 +0530
Subject: [PATCH] Initialize Event Service Config on bmcweb restart

Added instantiation of EventServiceManager Object in the
EventService constructor to initialize Event Service Config
and register the subscriptions from the config.

Tested:
 - Subscribed Events were successfully received on restart
   of bmcweb Service as well as on reboot of bmc

Change-Id: Ie2d446b49e172a057ba53e3d3692c40010fb88ff
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
---
 redfish-core/lib/event_service.hpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 095b76d..7a29af5 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -42,6 +42,9 @@ class EventService : public Node
             {boost::beast::http::verb::put, {{"ConfigureManager"}}},
             {boost::beast::http::verb::delete_, {{"ConfigureManager"}}},
             {boost::beast::http::verb::post, {{"ConfigureManager"}}}};
+
+        // Create EventServiceManager instance and initialize Config
+        EventServiceManager::getInstance();
     }
 
   private:
-- 
2.17.1