diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-08-26 10:58:17 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-08-26 10:58:17 -0700 |
commit | c84d4aa6d08770335e1a5debbd2f3daff3897d19 (patch) | |
tree | 85522ef3c538391da9fc8e40c0b929f00f150c80 /src/cpp/client/create_channel.cc | |
parent | 1dc323b45e1a109c860806cb25e7eca21c29a3c0 (diff) | |
parent | 60e0e743bed05b248c485949c6cd9e05fa02b607 (diff) |
Merge github.com:grpc/grpc into endpoints
Conflicts:
src/core/iomgr/tcp_windows.c
Diffstat (limited to 'src/cpp/client/create_channel.cc')
-rw-r--r-- | src/cpp/client/create_channel.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index 5ae772f096..8c571cbbaa 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -34,15 +34,16 @@ #include <memory> #include <sstream> -#include "src/cpp/client/channel.h" -#include <grpc++/channel_interface.h> -#include <grpc++/channel_arguments.h> +#include <grpc++/channel.h> #include <grpc++/create_channel.h> +#include <grpc++/support/channel_arguments.h> + +#include "src/cpp/client/create_channel_internal.h" namespace grpc { class ChannelArguments; -std::shared_ptr<ChannelInterface> CreateChannel( +std::shared_ptr<Channel> CreateChannel( const grpc::string& target, const std::shared_ptr<Credentials>& creds, const ChannelArguments& args) { ChannelArguments cp_args = args; @@ -50,10 +51,10 @@ std::shared_ptr<ChannelInterface> CreateChannel( user_agent_prefix << "grpc-c++/" << grpc_version_string(); cp_args.SetString(GRPC_ARG_PRIMARY_USER_AGENT_STRING, user_agent_prefix.str()); - return creds ? creds->CreateChannel(target, cp_args) - : std::shared_ptr<ChannelInterface>( - new Channel(grpc_lame_client_channel_create( - NULL, GRPC_STATUS_INVALID_ARGUMENT, - "Invalid credentials."))); + return creds + ? creds->CreateChannel(target, cp_args) + : CreateChannelInternal("", grpc_lame_client_channel_create( + NULL, GRPC_STATUS_INVALID_ARGUMENT, + "Invalid credentials.")); } } // namespace grpc |