diff options
author | Craig Tiller <ctiller@google.com> | 2017-01-23 07:48:42 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-01-23 07:48:42 -0800 |
commit | 7c70b6c144a20782b6be4751da68c6aa7b35648d (patch) | |
tree | f8ca929338d9f73cd9eec35001ecf52e3b1f6c1b /test/core/bad_ssl | |
parent | c7342a01bb069fcff6df0e22f6c2a403010998a1 (diff) |
Revert "Revert "Metadata handling rewrite""
This reverts commit 5e01e2ac977655aa074faf7fde0a74298f5e4c55.
Diffstat (limited to 'test/core/bad_ssl')
-rw-r--r-- | test/core/bad_ssl/bad_ssl_test.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/core/bad_ssl/bad_ssl_test.c b/test/core/bad_ssl/bad_ssl_test.c index f8a9fe6cac..9cce77e71a 100644 --- a/test/core/bad_ssl/bad_ssl_test.c +++ b/test/core/bad_ssl/bad_ssl_test.c @@ -57,8 +57,7 @@ static void run_test(const char *target, size_t nops) { grpc_metadata_array initial_metadata_recv; grpc_metadata_array trailing_metadata_recv; - char *details = NULL; - size_t details_capacity = 0; + grpc_slice details; grpc_status_code status; grpc_call_error error; gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); @@ -80,9 +79,10 @@ static void run_test(const char *target, size_t nops) { grpc_metadata_array_init(&trailing_metadata_recv); channel = grpc_secure_channel_create(ssl_creds, target, &args, NULL); + grpc_slice host = grpc_slice_from_static_string("foo.test.google.fr:1234"); c = grpc_channel_create_call(channel, NULL, GRPC_PROPAGATE_DEFAULTS, cq, - "/foo", "foo.test.google.fr:1234", deadline, - NULL); + grpc_slice_from_static_string("/foo"), &host, + deadline, NULL); memset(ops, 0, sizeof(ops)); op = ops; @@ -95,7 +95,6 @@ static void run_test(const char *target, size_t nops) { op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; op->data.recv_status_on_client.status = &status; op->data.recv_status_on_client.status_details = &details; - op->data.recv_status_on_client.status_details_capacity = &details_capacity; op->flags = 0; op->reserved = NULL; op++; @@ -117,7 +116,7 @@ static void run_test(const char *target, size_t nops) { GPR_ASSERT(status != GRPC_STATUS_OK); grpc_call_destroy(c); - gpr_free(details); + grpc_slice_unref(details); grpc_metadata_array_destroy(&initial_metadata_recv); grpc_metadata_array_destroy(&trailing_metadata_recv); |