diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2018-04-19 05:51:35 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-05 02:10:49 +0000 |
commit | ee4c6ebfd9e1697501b6fa0225d684867796a637 (patch) | |
tree | cd8754af8ca7c2c77ba038c491d848f96d7ce649 | |
parent | fb05210d0ef901fef164dbf8e8187a641794759b (diff) | |
download | phosphor-dbus-monitor-ee4c6ebfd9e1697501b6fa0225d684867796a637.tar.gz phosphor-dbus-monitor-ee4c6ebfd9e1697501b6fa0225d684867796a637.zip |
Fix callback unit test failure
Recently changes has been done in phosphor-logging commit
method causing the unit test failure with error message
"Error in mapper call". Earlier commit method
used to return error but the same has been modified to throw
exception now.
Fixed to return from the callback method if context is
start
Change-Id: I606c638bd2d0bc2003af0b284586e53809bbca21
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
-rw-r--r-- | src/elog.cpp | 6 | ||||
-rw-r--r-- | src/elog.hpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/elog.cpp b/src/elog.cpp index 9cd18c8..ba6e522 100644 --- a/src/elog.cpp +++ b/src/elog.cpp @@ -24,6 +24,12 @@ namespace monitoring void ElogBase::operator()(Context ctx) { + if (ctx == Context::START) + { + // No action should be taken as this call back is being called from + // daemon Startup. + return; + } log(); } diff --git a/src/elog.hpp b/src/elog.hpp index 996fd58..24e2009 100644 --- a/src/elog.hpp +++ b/src/elog.hpp @@ -154,6 +154,12 @@ class ElogWithMetadataCapture : public IndexedCallback */ void operator()(Context ctx) override { + if (ctx == Context::START) + { + // No action should be taken as this call back is being called from + // daemon Startup. + return; + } auto data = captureMetadata(); phosphor::logging::report<errorType>(metadataType(data.c_str())); |