aboutsummaryrefslogtreecommitdiffstats
path: root/vespaclient
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-24 14:58:49 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-28 15:04:29 +0200
commit237865038f13701e47199c6474ce82a90ffb0706 (patch)
treeb6f79da45f25f6a519ce39cbf59da45785e54f72 /vespaclient
parent10751c1edd819792d499131cd549fd972accc2de (diff)
- 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.
Diffstat (limited to 'vespaclient')
-rw-r--r--vespaclient/src/vespa/vespaclient/vesparoute/application.cpp9
1 files changed, 5 insertions, 4 deletions
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 <vespa/document/config/config-documenttypes.h>
#include <vespa/document/repo/documenttyperepo.h>
-#include <vespa/document/util/stringutil.h>
#include <vespa/documentapi/messagebus/documentprotocol.h>
#include <vespa/messagebus/configagent.h>
#include <vespa/messagebus/routing/routingtable.h>
#include <vespa/messagebus/routing/routedirective.h>
#include <vespa/messagebus/rpcmessagebus.h>
+#include <vespa/messagebus/network/rpcsendv1.h>
+#include <vespa/messagebus/network/rpcsendv2.h>
#include <vespa/slobrok/sbmirror.h>
#include <vespa/config/common/exceptions.h>
#include <vespa/config/helper/configgetter.hpp>
#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/fnet/frt/supervisor.h>
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;
}