event_parser.cpp (e3607a3c59c70ef1684f5c2108be56b1af874e12) event_parser.cpp (06f9b29e38f2090cfb69c370556f015abad48a02)
1#include "event_parser.hpp"
2
3#include <phosphor-logging/lg2.hpp>
4#include <xyz/openbmc_project/Common/error.hpp>
5
6#include <filesystem>
7#include <fstream>
8#include <set>

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

64
65 auto dbus = entry.value("dbus", emptyJson);
66 dbusInfo.objectPath = dbus.value("object_path", "");
67 dbusInfo.interface = dbus.value("interface", "");
68 dbusInfo.propertyName = dbus.value("property_name", "");
69 dbusInfo.propertyType = dbus.value("property_type", "");
70 if (dbusInfo.objectPath.empty() || dbusInfo.interface.empty() ||
71 dbusInfo.propertyName.empty() ||
1#include "event_parser.hpp"
2
3#include <phosphor-logging/lg2.hpp>
4#include <xyz/openbmc_project/Common/error.hpp>
5
6#include <filesystem>
7#include <fstream>
8#include <set>

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

64
65 auto dbus = entry.value("dbus", emptyJson);
66 dbusInfo.objectPath = dbus.value("object_path", "");
67 dbusInfo.interface = dbus.value("interface", "");
68 dbusInfo.propertyName = dbus.value("property_name", "");
69 dbusInfo.propertyType = dbus.value("property_type", "");
70 if (dbusInfo.objectPath.empty() || dbusInfo.interface.empty() ||
71 dbusInfo.propertyName.empty() ||
72 (supportedDbusPropertyTypes.find(dbusInfo.propertyType) ==
73 supportedDbusPropertyTypes.end()))
72 !supportedDbusPropertyTypes.contains(dbusInfo.propertyType))
74 {
75 error(
76 "Invalid dbus config, OBJPATH= {DBUS_OBJ_PATH} INTERFACE={DBUS_INTF} PROPERTY_NAME={DBUS_PROP} PROPERTY_TYPE={DBUS_PROP_TYPE}",
77 "DBUS_OBJ_PATH", dbusInfo.objectPath.c_str(), "DBUS_INTF",
78 dbusInfo.interface, "DBUS_PROP", dbusInfo.propertyName,
79 "DBUS_PROP_TYPE", dbusInfo.propertyType);
80 continue;
81 }

--- 79 unchanged lines hidden ---
73 {
74 error(
75 "Invalid dbus config, OBJPATH= {DBUS_OBJ_PATH} INTERFACE={DBUS_INTF} PROPERTY_NAME={DBUS_PROP} PROPERTY_TYPE={DBUS_PROP_TYPE}",
76 "DBUS_OBJ_PATH", dbusInfo.objectPath.c_str(), "DBUS_INTF",
77 dbusInfo.interface, "DBUS_PROP", dbusInfo.propertyName,
78 "DBUS_PROP_TYPE", dbusInfo.propertyType);
79 continue;
80 }

--- 79 unchanged lines hidden ---