Make changes to fix test failures

pull/18373/head
Karthik Ravi Shankar 6 years ago
parent 392554e341
commit 130962490b
  1. 2
      include/grpcpp/create_channel_posix.h
  2. 32
      src/cpp/client/create_channel_posix.cc

@ -43,7 +43,7 @@ CreateCustomInsecureChannelWithInterceptorsFromFd(
std::unique_ptr<std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>>
interceptor_creators) {
return CreateCustomInsecureChannelWithInterceptorsFromFd(
return ::grpc_impl::experimental::CreateCustomInsecureChannelWithInterceptorsFromFd(
target, fd, args, std::move(interceptor_creators));
}

@ -24,45 +24,45 @@
#include "src/cpp/client/create_channel_internal.h"
namespace grpc {
namespace grpc_impl {
#ifdef GPR_SUPPORT_CHANNELS_FROM_FD
std::shared_ptr<Channel> CreateInsecureChannelFromFd(const grpc::string& target,
std::shared_ptr<grpc::Channel> CreateInsecureChannelFromFd(const grpc::string& target,
int fd) {
internal::GrpcLibrary init_lib;
grpc::internal::GrpcLibrary init_lib;
init_lib.init();
return CreateChannelInternal(
return grpc::CreateChannelInternal(
"", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr),
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>());
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>());
}
std::shared_ptr<Channel> CreateCustomInsecureChannelFromFd(
const grpc::string& target, int fd, const ChannelArguments& args) {
internal::GrpcLibrary init_lib;
std::shared_ptr<grpc::Channel> CreateCustomInsecureChannelFromFd(
const grpc::string& target, int fd, const grpc::ChannelArguments& args) {
grpc::internal::GrpcLibrary init_lib;
init_lib.init();
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
return grpc::CreateChannelInternal(
"",
grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args),
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>());
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>());
}
namespace experimental {
std::shared_ptr<Channel> CreateCustomInsecureChannelWithInterceptorsFromFd(
const grpc::string& target, int fd, const ChannelArguments& args,
std::shared_ptr<grpc::Channel> CreateCustomInsecureChannelWithInterceptorsFromFd(
const grpc::string& target, int fd, const grpc::ChannelArguments& args,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) {
internal::GrpcLibrary init_lib;
grpc::internal::GrpcLibrary init_lib;
init_lib.init();
grpc_channel_args channel_args;
args.SetChannelArgs(&channel_args);
return CreateChannelInternal(
return grpc::CreateChannelInternal(
"",
grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args),
std::move(interceptor_creators));
@ -72,4 +72,4 @@ std::shared_ptr<Channel> CreateCustomInsecureChannelWithInterceptorsFromFd(
#endif // GPR_SUPPORT_CHANNELS_FROM_FD
} // namespace grpc
} // namespace grpc_impl

Loading…
Cancel
Save