summaryrefslogtreecommitdiffstats
path: root/messagebus
diff options
context:
space:
mode:
Diffstat (limited to 'messagebus')
-rw-r--r--messagebus/src/vespa/messagebus/network/rpcsend.cpp8
-rw-r--r--messagebus/src/vespa/messagebus/routing/routeparser.cpp5
2 files changed, 7 insertions, 6 deletions
diff --git a/messagebus/src/vespa/messagebus/network/rpcsend.cpp b/messagebus/src/vespa/messagebus/network/rpcsend.cpp
index 04cccd59903..87c87173ec7 100644
--- a/messagebus/src/vespa/messagebus/network/rpcsend.cpp
+++ b/messagebus/src/vespa/messagebus/network/rpcsend.cpp
@@ -207,12 +207,12 @@ RPCSend::decode(vespalib::stringref protocolName, const vespalib::Version & vers
}
} else {
error = Error(ErrorCode::DECODE_ERROR,
- make_string("Protocol '%s' failed to decode routable.", protocolName.c_str()));
+ make_string("Protocol '%s' failed to decode routable.", vespalib::string(protocolName).c_str()));
}
} else {
error = Error(ErrorCode::UNKNOWN_PROTOCOL,
- make_string("Protocol '%s' is not known by %s.", protocolName.c_str(), _serverIdent.c_str()));
+ make_string("Protocol '%s' is not known by %s.", vespalib::string(protocolName).c_str(), _serverIdent.c_str()));
}
return reply;
}
@@ -263,7 +263,7 @@ RPCSend::invoke(FRT_RPCRequest *req)
if (protocol == nullptr) {
replyError(req, params->getVersion(), params->getTraceLevel(),
Error(ErrorCode::UNKNOWN_PROTOCOL, make_string("Protocol '%s' is not known by %s.",
- params->getProtocol().c_str(), _serverIdent.c_str())));
+ vespalib::string(params->getProtocol()).c_str(), _serverIdent.c_str())));
return;
}
if (protocol->requireSequencing() || !_net->allowDispatchForDecode()) {
@@ -284,7 +284,7 @@ RPCSend::doRequest(FRT_RPCRequest *req, const IProtocol * protocol, std::unique_
if ( ! routable ) {
replyError(req, params->getVersion(), params->getTraceLevel(),
Error(ErrorCode::DECODE_ERROR,
- make_string("Protocol '%s' failed to decode routable.", params->getProtocol().c_str())));
+ make_string("Protocol '%s' failed to decode routable.", vespalib::string(params->getProtocol()).c_str())));
return;
}
if (routable->isReply()) {
diff --git a/messagebus/src/vespa/messagebus/routing/routeparser.cpp b/messagebus/src/vespa/messagebus/routing/routeparser.cpp
index 3bc9b57d1e7..0fb90f0d585 100644
--- a/messagebus/src/vespa/messagebus/routing/routeparser.cpp
+++ b/messagebus/src/vespa/messagebus/routing/routeparser.cpp
@@ -34,8 +34,9 @@ RouteParser::createTcpDirective(const stringref &str)
if (posS == string::npos || posS == posP + 1) {
return IHopDirective::SP(); // no port
}
+ // FIXME C++17 range-safe from_chars() instead of atoi()
return IHopDirective::SP(new TcpDirective(str.substr(0, posP),
- atoi(str.substr(posP + 1, posS - 1).c_str()),
+ atoi(str.substr(posP + 1, posS - 1).data()),
str.substr(posS + 1)));
}
@@ -104,7 +105,7 @@ RouteParser::createHop(stringref str)
return Hop().addDirective(createErrorDirective(
vespalib::make_string(
"Failed to completely parse '%s'.",
- str.c_str())));
+ vespalib::string(str).c_str())));
} else if (str[at] == '[') {
++depth;
} else if (str[at] == ']') {