aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-02-17 10:44:54 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-02-17 10:44:54 -0800
commit5b589fa45df38306347d31f4f79366e0bca3422d (patch)
tree6787eb02240148cf613091051971164c8e855e98 /src
parent2531299eba2fad423108222a8550e4ef11209ebd (diff)
parentce223c531f2b79d676a669f2b214234688f3bd99 (diff)
Merge branch 'c++api' of github.com:ctiller/grpc into c++api
Diffstat (limited to 'src')
-rw-r--r--src/cpp/client/channel.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpp/client/channel.cc b/src/cpp/client/channel.cc
index 440423dba9..b2fc0c97ee 100644
--- a/src/cpp/client/channel.cc
+++ b/src/cpp/client/channel.cc
@@ -81,8 +81,11 @@ Channel::~Channel() { grpc_channel_destroy(c_channel_); }
Call Channel::CreateCall(const RpcMethod &method, ClientContext *context,
CompletionQueue *cq) {
auto c_call =
- grpc_channel_create_call(c_channel_, cq->cq(), method.name(),
- target_.c_str(), context->RawDeadline());
+ grpc_channel_create_call(
+ c_channel_, cq->cq(), method.name(),
+ context->authority().empty() ? target_.c_str()
+ : context->authority().c_str(),
+ context->RawDeadline());
context->set_call(c_call);
return Call(c_call, this, cq);
}