From f0d7fbd3f508499be9a29c9a820289bf0ad83804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 16 Mar 2015 09:55:17 +0100 Subject: [PATCH] bump guh version and add a more specific rule error --- debian/changelog | 6 ++++++ server/jsonrpc/jsonrpcserver.cpp | 2 +- server/jsonrpc/ruleshandler.cpp | 2 +- server/ruleengine.h | 3 ++- tests/auto/api.json | 5 +++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index e52b5053..256ee2a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +guh (0.3.0) utopic; urgency=medium + + * update rule engine and many other small changes + + -- Simon Stürz Mon, 16 Mar 2015 09:52:40 +0100 + guh (0.2.0) UNRELEASED; urgency=medium * split plugins into dynamic libs and packages diff --git a/server/jsonrpc/jsonrpcserver.cpp b/server/jsonrpc/jsonrpcserver.cpp index 840d24ff..dd4e7793 100644 --- a/server/jsonrpc/jsonrpcserver.cpp +++ b/server/jsonrpc/jsonrpcserver.cpp @@ -44,7 +44,7 @@ #include #include -#define JSON_PROTOCOL_VERSION 18 +#define JSON_PROTOCOL_VERSION 19 JsonRPCServer::JsonRPCServer(QObject *parent): JsonHandler(parent), diff --git a/server/jsonrpc/ruleshandler.cpp b/server/jsonrpc/ruleshandler.cpp index f3785392..8f99b25b 100644 --- a/server/jsonrpc/ruleshandler.cpp +++ b/server/jsonrpc/ruleshandler.cpp @@ -203,7 +203,7 @@ JsonReply* RulesHandler::AddRule(const QVariantMap ¶ms) if (eventParamType != actionParamType) { QVariantMap returns; qWarning() << "RuleActionParam" << ruleActionParam.name() << " and given event param have not the same type."; - returns.insert("ruleError", JsonTypes::ruleErrorToString(RuleEngine::RuleErrorInvalidRuleActionParameter)); + returns.insert("ruleError", JsonTypes::ruleErrorToString(RuleEngine::RuleErrorTypesNotMatching)); return createReply(returns); } } diff --git a/server/ruleengine.h b/server/ruleengine.h index 42961eda..d7f760a2 100644 --- a/server/ruleengine.h +++ b/server/ruleengine.h @@ -43,7 +43,8 @@ public: RuleErrorInvalidParameter, RuleErrorInvalidRuleFormat, RuleErrorMissingParameter, - RuleErrorInvalidRuleActionParameter + RuleErrorInvalidRuleActionParameter, + RuleErrorTypesNotMatching }; enum RemovePolicy { diff --git a/tests/auto/api.json b/tests/auto/api.json index 284ddfc0..1ffa04bb 100644 --- a/tests/auto/api.json +++ b/tests/auto/api.json @@ -1,4 +1,4 @@ -18 +19 { "methods": { "Actions.ExecuteAction": { @@ -608,7 +608,8 @@ "RuleErrorInvalidParameter", "RuleErrorInvalidRuleFormat", "RuleErrorMissingParameter", - "RuleErrorInvalidRuleActionParameter" + "RuleErrorInvalidRuleActionParameter", + "RuleErrorTypesNotMatching" ], "SetupMethod": [ "SetupMethodJustAdd",