From df99a2f438f5d9739f74a9ec0520d5135055d489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 13 Jul 2015 17:35:04 +0200 Subject: [PATCH] fixed log error and action execution from the log engine --- server/guhcore.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/guhcore.cpp b/server/guhcore.cpp index dc349269..52908413 100644 --- a/server/guhcore.cpp +++ b/server/guhcore.cpp @@ -496,7 +496,7 @@ void GuhCore::gotEvent(const Event &event) foreach (const RuleAction &ruleAction, actions) { Action action = ruleAction.toAction(); qCDebug(dcRuleEngine) << "executing action" << ruleAction.actionTypeId(); - DeviceManager::DeviceError status = m_deviceManager->executeAction(action); + DeviceManager::DeviceError status = executeAction(action); switch(status) { case DeviceManager::DeviceErrorNoError: break; @@ -512,7 +512,9 @@ void GuhCore::gotEvent(const Event &event) default: qCWarning(dcRuleEngine) << "Error executing action:" << status; } - m_logger->logAction(action, status == DeviceManager::DeviceErrorNoError ? Logging::LoggingLevelInfo : Logging::LoggingLevelAlert, status); + + if (status != DeviceManager::DeviceErrorAsync) + m_logger->logAction(action, status == DeviceManager::DeviceErrorNoError ? Logging::LoggingLevelInfo : Logging::LoggingLevelAlert, status); } }