PR comments

pull/8226/head
David Garcia Quintas 8 years ago
parent 5f2e90e3ae
commit 0d366c983c
  1. 2
      src/core/ext/resolver/sockaddr/sockaddr_resolver.c
  2. 5
      test/core/client_config/resolvers/sockaddr_resolver_test.c

@ -222,7 +222,7 @@ static grpc_resolver *sockaddr_create(
if (errors_found) break; if (errors_found) break;
} }
r->target_name = gpr_dump_slice(path_slice, GPR_DUMP_ASCII); r->target_name = gpr_strdup(args->uri->path);
gpr_slice_buffer_destroy(&path_parts); gpr_slice_buffer_destroy(&path_parts);
gpr_slice_unref(path_slice); gpr_slice_unref(path_slice);
if (errors_found) { if (errors_found) {

@ -70,16 +70,15 @@ static void test_succeeds(grpc_resolver_factory *factory, const char *string) {
on_resolution_arg on_res_arg; on_resolution_arg on_res_arg;
memset(&on_res_arg, 0, sizeof(on_res_arg)); memset(&on_res_arg, 0, sizeof(on_res_arg));
on_res_arg.expected_server_name = gpr_strdup(uri->path); on_res_arg.expected_server_name = uri->path;
grpc_closure *on_resolution = grpc_closure *on_resolution =
grpc_closure_create(on_resolution_cb, &on_res_arg); grpc_closure_create(on_resolution_cb, &on_res_arg);
grpc_resolver_next(&exec_ctx, resolver, &on_res_arg.resolver_result, grpc_resolver_next(&exec_ctx, resolver, &on_res_arg.resolver_result,
on_resolution); on_resolution);
GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds"); GRPC_RESOLVER_UNREF(&exec_ctx, resolver, "test_succeeds");
grpc_uri_destroy(uri);
grpc_exec_ctx_finish(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx);
gpr_free(on_res_arg.expected_server_name); grpc_uri_destroy(uri);
} }
static void test_fails(grpc_resolver_factory *factory, const char *string) { static void test_fails(grpc_resolver_factory *factory, const char *string) {

Loading…
Cancel
Save