Skip to content
Snippets Groups Projects
Commit 86e90590 authored by Mark D. Roth's avatar Mark D. Roth
Browse files

Avoid confusion between server name and URI.

parent 21d4b2d9
Branches
Tags
No related merge requests found
......@@ -213,6 +213,8 @@ typedef struct {
#define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
/** LB policy name. */
#define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
/** Server URI. Not intended for external use. */
#define GRPC_ARG_SERVER_URI "grpc.server_uri"
/** Server name. Not intended for external use. */
#define GRPC_ARG_SERVER_NAME "grpc.server_name"
/** Resolved addresses in a form used by the LB policy.
......
......
......@@ -474,7 +474,7 @@ static void cc_init_channel_elem(grpc_exec_ctx *exec_ctx,
grpc_client_channel_factory_ref(arg->value.pointer.p);
chand->client_channel_factory = arg->value.pointer.p;
// Instantiate resolver.
arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVER_NAME);
arg = grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVER_URI);
GPR_ASSERT(arg != NULL);
GPR_ASSERT(arg->type == GRPC_ARG_STRING);
chand->resolver = grpc_resolver_create(arg->value.string, args->channel_args);
......
......
......@@ -237,7 +237,7 @@ grpc_channel *grpc_insecure_channel_create(const char *target,
// Add channel args containing the server name and client channel factory.
grpc_arg new_args[2];
new_args[0].type = GRPC_ARG_STRING;
new_args[0].key = GRPC_ARG_SERVER_NAME;
new_args[0].key = GRPC_ARG_SERVER_URI;
new_args[0].value.string = (char *)target;
new_args[1].type = GRPC_ARG_POINTER;
new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY;
......
......
......@@ -346,7 +346,7 @@ grpc_channel *grpc_secure_channel_create(grpc_channel_credentials *creds,
// factory, and security connector.
grpc_arg new_args[3];
new_args[0].type = GRPC_ARG_STRING;
new_args[0].key = GRPC_ARG_SERVER_NAME;
new_args[0].key = GRPC_ARG_SERVER_URI;
new_args[0].value.string = (char *)target;
new_args[1].type = GRPC_ARG_POINTER;
new_args[1].key = GRPC_ARG_CLIENT_CHANNEL_FACTORY;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment