summaryrefslogtreecommitdiffstats
path: root/src/resolve_errors.cpp
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-29 10:34:05 -0400
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-29 10:34:46 -0400
commitd1eac88d18ae7dd11033dba87b6aebb220da9064 (patch)
tree9744e38138ff853c53868d847f86e9ad58e9ac66 /src/resolve_errors.cpp
parent1abcb06bedadfbd40b4ec6f7e5f6a95021df3c96 (diff)
downloadphosphor-dbus-monitor-d1eac88d18ae7dd11033dba87b6aebb220da9064.tar.gz
phosphor-dbus-monitor-d1eac88d18ae7dd11033dba87b6aebb220da9064.zip
Enable clang-format
Fix up errors and enable clang-format during CI builds. Change-Id: I4176b81f8b85a287af9354165e09ff66aeb9fb29 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'src/resolve_errors.cpp')
-rw-r--r--src/resolve_errors.cpp43
1 files changed, 16 insertions, 27 deletions
diff --git a/src/resolve_errors.cpp b/src/resolve_errors.cpp
index 54f0b78..47277eb 100644
--- a/src/resolve_errors.cpp
+++ b/src/resolve_errors.cpp
@@ -36,7 +36,7 @@ using EndpointsProperty = sdbusplus::message::variant<EndpointList>;
void ResolveCallout::operator()(Context ctx)
{
- //Resolve all errors for this callout:
+ // Resolve all errors for this callout:
// 1) Read the 'endpoints' property for the callout/fault object
//
// 2) Follow each endpoint to its log entry
@@ -50,21 +50,17 @@ void ResolveCallout::operator()(Context ctx)
if (busName.empty())
{
- //Just means there are no error logs with this callout
+ // Just means there are no error logs with this callout
return;
}
auto endpoints = SDBusPlus::callMethodAndRead<EndpointsProperty>(
- busName,
- path,
- PROPERTY_IFACE,
- "Get",
- ASSOCIATION_IFACE,
- ENDPOINTS_PROPERTY);
+ busName, path, PROPERTY_IFACE, "Get", ASSOCIATION_IFACE,
+ ENDPOINTS_PROPERTY);
const auto& logEntries = endpoints.get<EndpointList>();
- //Resolve each log entry
+ // Resolve each log entry
for (const auto& logEntry : logEntries)
{
resolve(logEntry);
@@ -72,10 +68,9 @@ void ResolveCallout::operator()(Context ctx)
}
catch (const std::exception& e)
{
- log<level::ERR>(
- "Failed getting callout fault associations",
- entry("CALLOUT=%s", callout.c_str()),
- entry("MESSAGE=%s", e.what()));
+ log<level::ERR>("Failed getting callout fault associations",
+ entry("CALLOUT=%s", callout.c_str()),
+ entry("MESSAGE=%s", e.what()));
}
}
@@ -95,28 +90,22 @@ void ResolveCallout::resolve(const std::string& logEntry)
sdbusplus::message::variant<bool> resolved = true;
- auto response = SDBusPlus::callMethod(
- busName,
- logEntry,
- PROPERTY_IFACE,
- "Set",
- LOGGING_IFACE,
- RESOLVED_PROPERTY,
- resolved);
+ auto response =
+ SDBusPlus::callMethod(busName, logEntry, PROPERTY_IFACE, "Set",
+ LOGGING_IFACE, RESOLVED_PROPERTY, resolved);
if (response.is_method_error())
{
log<level::ERR>(
- "Failed to set Resolved property on an error log entry",
- entry("ENTRY=%s", logEntry.c_str()));
+ "Failed to set Resolved property on an error log entry",
+ entry("ENTRY=%s", logEntry.c_str()));
}
}
catch (const std::exception& e)
{
- log<level::ERR>(
- "Unable to resolve error log entry",
- entry("ENTRY=%s", logEntry.c_str()),
- entry("MESSAGE=%s", e.what()));
+ log<level::ERR>("Unable to resolve error log entry",
+ entry("ENTRY=%s", logEntry.c_str()),
+ entry("MESSAGE=%s", e.what()));
}
}
OpenPOWER on IntegriCloud