diff options
author | jiangtaoli2016 <jiangtao@google.com> | 2017-04-10 15:03:21 -0700 |
---|---|---|
committer | jiangtaoli2016 <jiangtao@google.com> | 2017-04-10 15:03:21 -0700 |
commit | a2a2024944a92ec1dbf0ec827659ee408cb4c1e3 (patch) | |
tree | ab8adaaf5861dcf83f6b4a9ee75bd9c04873faa6 /src | |
parent | e69881de7fd5a2f09ad92986c48e5fa2a013bb34 (diff) |
Use handshaker_result_created in tsi_adapter_handshaker
Diffstat (limited to 'src')
-rw-r--r-- | src/core/tsi/transport_security_adapter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/tsi/transport_security_adapter.c b/src/core/tsi/transport_security_adapter.c index 60cebdd6f2..ebf0279139 100644 --- a/src/core/tsi/transport_security_adapter.c +++ b/src/core/tsi/transport_security_adapter.c @@ -191,7 +191,9 @@ static tsi_result tsi_adapter_next( *bytes_to_send_size = offset; /* If handshake completes, create tsi_handshaker_result. */ - if (!tsi_handshaker_is_in_progress(impl->wrapped)) { + if (tsi_handshaker_is_in_progress(impl->wrapped)) { + *handshaker_result = NULL; + } else { size_t unused_bytes_size = received_bytes_size - bytes_consumed; const unsigned char *unused_bytes = unused_bytes_size == 0 ? NULL : received_bytes + bytes_consumed; @@ -200,8 +202,6 @@ static tsi_result tsi_adapter_next( if (status == TSI_OK) { impl->base.handshaker_result_created = true; } - } else { - *handshaker_result = NULL; } return status; } |