dbus_monitor.hpp (f23b729676559f539790580930b1ff3b0c05805b) dbus_monitor.hpp (81ce609e30274435b4f8c3fc65340c6b6b153b0c)
1#pragma once
2#include <app.hpp>
3#include <async_resp.hpp>
4#include <boost/container/flat_map.hpp>
5#include <boost/container/flat_set.hpp>
6#include <dbus_singleton.hpp>
7#include <openbmc_dbus_rest.hpp>
8#include <sdbusplus/bus/match.hpp>

--- 13 unchanged lines hidden (view full) ---

22 boost::container::flat_set<std::string> interfaces;
23};
24
25static boost::container::flat_map<crow::websocket::Connection*,
26 DbusWebsocketSession>
27 sessions;
28
29inline int onPropertyUpdate(sd_bus_message* m, void* userdata,
1#pragma once
2#include <app.hpp>
3#include <async_resp.hpp>
4#include <boost/container/flat_map.hpp>
5#include <boost/container/flat_set.hpp>
6#include <dbus_singleton.hpp>
7#include <openbmc_dbus_rest.hpp>
8#include <sdbusplus/bus/match.hpp>

--- 13 unchanged lines hidden (view full) ---

22 boost::container::flat_set<std::string> interfaces;
23};
24
25static boost::container::flat_map<crow::websocket::Connection*,
26 DbusWebsocketSession>
27 sessions;
28
29inline int onPropertyUpdate(sd_bus_message* m, void* userdata,
30 sd_bus_error* ret_error)
30 sd_bus_error* retError)
31{
31{
32 if (ret_error == nullptr || sd_bus_error_is_set(ret_error))
32 if (retError == nullptr || sd_bus_error_is_set(retError))
33 {
34 BMCWEB_LOG_ERROR << "Got sdbus error on match";
35 return 0;
36 }
37 crow::websocket::Connection* connection =
38 static_cast<crow::websocket::Connection*>(userdata);
39 auto thisSession = sessions.find(connection);
40 if (thisSession == sessions.end())

--- 204 unchanged lines hidden ---
33 {
34 BMCWEB_LOG_ERROR << "Got sdbus error on match";
35 return 0;
36 }
37 crow::websocket::Connection* connection =
38 static_cast<crow::websocket::Connection*>(userdata);
39 auto thisSession = sessions.find(connection);
40 if (thisSession == sessions.end())

--- 204 unchanged lines hidden ---