From 237865038f13701e47199c6474ce82a90ffb0706 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 24 Aug 2017 14:58:49 +0200 Subject: - Use C++11 for loops. - Detangle some includes and include what you need. - Refactor to subclass to avoid code duplication. - Add config for compression too. - V1 up to 142, V2 above. --- vespaclient/src/vespa/vespaclient/vesparoute/application.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'vespaclient/src') diff --git a/vespaclient/src/vespa/vespaclient/vesparoute/application.cpp b/vespaclient/src/vespa/vespaclient/vesparoute/application.cpp index 1a518b4c819..fe4600aea58 100644 --- a/vespaclient/src/vespa/vespaclient/vesparoute/application.cpp +++ b/vespaclient/src/vespa/vespaclient/vesparoute/application.cpp @@ -4,16 +4,18 @@ #include #include -#include #include #include #include #include #include +#include +#include #include #include #include #include +#include using config::ConfigGetter; using document::DocumenttypesConfig; @@ -528,9 +530,8 @@ Application::isService(FRT_Supervisor &frt, const std::string &spec) const FRT_StringValue *retList = req->GetReturn()->GetValue(2)._string_array._pt; for (uint32_t i = 0; i < numMethods; ++i) { - if (strcmp(methods[i]._str, mbus::RPCSendV1::METHOD_NAME) == 0 && - strcmp(argList[i]._str, mbus::RPCSendV1::METHOD_PARAMS) == 0 && - strcmp(retList[i]._str, mbus::RPCSendV1::METHOD_RETURN) == 0) { + if (mbus::RPCSendV1::isCompatible(methods[i]._str,argList[i]._str, retList[i]._str) || + mbus::RPCSendV2::isCompatible(methods[i]._str,argList[i]._str, retList[i]._str)) { ret = true; break; } -- cgit v1.2.3