|
|
|
@ -39,6 +39,7 @@ |
|
|
|
|
#include <grpc/support/string_util.h> |
|
|
|
|
|
|
|
|
|
#include "src/core/ext/client_channel/client_channel.h" |
|
|
|
|
#include "src/core/ext/client_channel/resolver_registry.h" |
|
|
|
|
#include "src/core/ext/transport/chttp2/client/chttp2_connector.h" |
|
|
|
|
#include "src/core/lib/channel/channel_args.h" |
|
|
|
|
#include "src/core/lib/security/credentials/credentials.h" |
|
|
|
@ -69,8 +70,9 @@ static grpc_channel *client_channel_factory_create_channel( |
|
|
|
|
grpc_arg arg; |
|
|
|
|
arg.type = GRPC_ARG_STRING; |
|
|
|
|
arg.key = GRPC_ARG_SERVER_URI; |
|
|
|
|
arg.value.string = (char *)target; |
|
|
|
|
arg.value.string = grpc_resolver_factory_add_default_prefix_if_needed(target); |
|
|
|
|
grpc_channel_args *new_args = grpc_channel_args_copy_and_add(args, &arg, 1); |
|
|
|
|
gpr_free(arg.value.string); |
|
|
|
|
grpc_channel *channel = grpc_channel_create(exec_ctx, target, new_args, |
|
|
|
|
GRPC_CLIENT_CHANNEL, NULL); |
|
|
|
|
grpc_channel_args_destroy(exec_ctx, new_args); |
|
|
|
|