diff options
author | Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> | 2017-08-09 09:10:47 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-08-10 17:31:53 +0000 |
commit | 18e9999232b76cc311bd307fd28adce0fb17db9a (patch) | |
tree | cae5703d184253d21bd2f40b448cfa0e147d6482 /sensordatahandler.cpp | |
parent | 63a0051b4f93f1422998f0748c9ac6c0111d25c3 (diff) | |
download | phosphor-host-ipmid-18e9999232b76cc311bd307fd28adce0fb17db9a.tar.gz phosphor-host-ipmid-18e9999232b76cc311bd307fd28adce0fb17db9a.zip |
Fix for reboot attempt and catch internal failures.
The assumption was reboot attempt left will be sent through
reading data in ipmi sensor data, but it is being sent as
assertion so adding support to read raw data from assertion bits.
Added a catch for internal failures while calling update function
for sensors.
Change-Id: If45d003c1c22f60e7c8a723c1ff9d077c53cad37
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
Diffstat (limited to 'sensordatahandler.cpp')
-rw-r--r-- | sensordatahandler.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sensordatahandler.cpp b/sensordatahandler.cpp index 6c7b9ac..7c4cd3c 100644 --- a/sensordatahandler.cpp +++ b/sensordatahandler.cpp @@ -40,9 +40,9 @@ ServicePath getServiceAndPath(sdbusplus::bus::bus& bus, auto mapperResponseMsg = bus.call(mapperCall); if (mapperResponseMsg.is_method_error()) { - std::string err = "Error in mapper GetSubTree " - "Interface: " + interface; - log<level::ERR>(err.c_str()); + log<level::ERR>("Mapper GetSubTree failed", + entry("PATH=%s", path), + entry("INTERFACE=%s", interface)); elog<InternalFailure>(); } @@ -50,10 +50,9 @@ ServicePath getServiceAndPath(sdbusplus::bus::bus& bus, mapperResponseMsg.read(mapperResponse); if (mapperResponse.empty()) { - std::string err = "Invalid response from mapper " - "Command: GetSubTree " - "Interface:" + interface; - log<level::ERR>(err.c_str()); + log<level::ERR>("Invalid mapper response", + entry("PATH=%s", path), + entry("INTERFACE=%s", interface)); elog<InternalFailure>(); } @@ -66,10 +65,9 @@ ServicePath getServiceAndPath(sdbusplus::bus::bus& bus, const auto& iter = mapperResponse.find(path); if (iter == mapperResponse.end()) { - std::string err = "Error in finding sensor dbus" - "Command: GetSubTree " - "Interface:" + interface; - log<level::ERR>(err.c_str()); + log<level::ERR>("Coudn't find d-bus path", + entry("PATH=%s", path), + entry("INTERFACE=%s", interface)); elog<InternalFailure>(); } return std::make_pair(iter->first, iter->second.begin()->first); |