aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/client
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-09-27 11:26:05 -0400
committerGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-09-27 11:27:15 -0400
commit80ce1865d765f3a3623a8d6420b8e82e3f4b5cca (patch)
treeff9fc906f887362918d06f5dffacb26e05a10372 /src/cpp/client
parent369cfe118cbfda61c3fc205a18d1b1924d853700 (diff)
Make SliceFromArray() static in channel_cc.cc.
Also, use `context->authority_` instead of `context->authority()` for consistency.
Diffstat (limited to 'src/cpp/client')
-rw-r--r--src/cpp/client/channel_cc.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc
index 510ae73478..31c02893b1 100644
--- a/src/cpp/client/channel_cc.cc
+++ b/src/cpp/client/channel_cc.cc
@@ -65,6 +65,10 @@ Channel::~Channel() {
namespace {
+inline grpc_slice SliceFromArray(const char* arr, size_t len) {
+ return g_core_codegen_interface->grpc_slice_from_copied_buffer(arr, len);
+}
+
grpc::string GetChannelInfoField(grpc_channel* channel,
grpc_channel_info* channel_info,
char*** channel_info_field) {
@@ -112,7 +116,7 @@ internal::Call Channel::CreateCall(const internal::RpcMethod& method,
method.channel_tag(), context->raw_deadline(), nullptr);
} else {
const string* host_str = nullptr;
- if (!context->authority().empty()) {
+ if (!context->authority_.empty()) {
host_str = &context->authority_;
} else if (!host_.empty()) {
host_str = &host_;