aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/http_proxy.c
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-06-09 09:08:23 -0700
committerGravatar Mark D. Roth <roth@google.com>2017-06-09 09:08:23 -0700
commit8d5e60b8787d1a6aefca037a08799f58a22aa78d (patch)
tree1793acde49dfa0407c5da12816304a691c622221 /src/core/ext/filters/client_channel/http_proxy.c
parent74923accac565cd7a4bd07b6ff054e8464f65fc1 (diff)
Add helpers for creating channel args.
Diffstat (limited to 'src/core/ext/filters/client_channel/http_proxy.c')
-rw-r--r--src/core/ext/filters/client_channel/http_proxy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/ext/filters/client_channel/http_proxy.c b/src/core/ext/filters/client_channel/http_proxy.c
index b8332980e5..cfb5ec6f00 100644
--- a/src/core/ext/filters/client_channel/http_proxy.c
+++ b/src/core/ext/filters/client_channel/http_proxy.c
@@ -80,10 +80,9 @@ static bool proxy_mapper_map_name(grpc_exec_ctx* exec_ctx,
grpc_uri_destroy(uri);
return false;
}
- grpc_arg new_arg;
- new_arg.key = GRPC_ARG_HTTP_CONNECT_SERVER;
- new_arg.type = GRPC_ARG_STRING;
- new_arg.value.string = uri->path[0] == '/' ? uri->path + 1 : uri->path;
+ grpc_arg new_arg = grpc_channel_arg_string_create(
+ GRPC_ARG_HTTP_CONNECT_SERVER,
+ uri->path[0] == '/' ? uri->path + 1 : uri->path);
*new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1);
grpc_uri_destroy(uri);
return true;