diff options
author | Julien Boeuf <jboeuf@google.com> | 2015-05-20 22:50:34 -0700 |
---|---|---|
committer | Julien Boeuf <jboeuf@google.com> | 2015-05-20 22:50:34 -0700 |
commit | 83b029726b3b110a79e7432427e1050371b26dce (patch) | |
tree | 7fcf8b4eda3087f20be800cf609a7f376bf6a5aa /test/core/end2end/tests | |
parent | ae5b17015554da18e9d49ba0069d6e88d6835eac (diff) |
Addressing comments.
Diffstat (limited to 'test/core/end2end/tests')
-rw-r--r-- | test/core/end2end/tests/request_response_with_payload_and_call_creds.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c index 8e1fb63d74..6eae92f28c 100644 --- a/test/core/end2end/tests/request_response_with_payload_and_call_creds.c +++ b/test/core/end2end/tests/request_response_with_payload_and_call_creds.c @@ -113,23 +113,19 @@ static void end_test(grpc_end2end_test_fixture *f) { static void print_auth_context(int is_client, const grpc_auth_context *ctx) { const grpc_auth_property *p; - grpc_auth_property_iterator *it; + grpc_auth_property_iterator it; gpr_log(GPR_INFO, "%s peer:", is_client ? "client" : "server"); + gpr_log(GPR_INFO, "\tauthenticated: %s", + grpc_auth_context_peer_is_authenticated(ctx) ? "YES" : "NO"); it = grpc_auth_context_peer_identity(ctx); - gpr_log(GPR_INFO, "\tauthenticated: %s", it != NULL ? "YES" : "NO"); - if (it != NULL) { - while ((p = grpc_auth_property_iterator_next(it)) != NULL) { - gpr_log(GPR_INFO, "\t\t%s: %s", p->name, p->value); - } - grpc_auth_property_iterator_destroy(it); + while ((p = grpc_auth_property_iterator_next(&it)) != NULL) { + gpr_log(GPR_INFO, "\t\t%s: %s", p->name, p->value); } gpr_log(GPR_INFO, "\tall properties:"); it = grpc_auth_context_property_iterator(ctx); - GPR_ASSERT(it != NULL); - while ((p = grpc_auth_property_iterator_next(it)) != NULL) { + while ((p = grpc_auth_property_iterator_next(&it)) != NULL) { gpr_log(GPR_INFO, "\t\t%s: %s", p->name, p->value); } - grpc_auth_property_iterator_destroy(it); } static void test_call_creds_failure(grpc_end2end_test_config config) { |