From bcb8ce00159364450d222607520a56e6dba62725 Mon Sep 17 00:00:00 2001
From: Craig Tiller <ctiller@google.com>
Date: Wed, 1 Jun 2016 17:26:07 -0700
Subject: [PATCH] Rename tsi function

---
 src/core/lib/security/transport/handshake.c      | 16 ++++++++--------
 .../lib/security/transport/secure_endpoint.c     |  4 ++--
 src/core/lib/security/transport/tsi_error.c      |  2 +-
 src/core/lib/security/transport/tsi_error.h      |  2 +-
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c
index c87262f124..63c9129ae8 100644
--- a/src/core/lib/security/transport/handshake.c
+++ b/src/core/lib/security/transport/handshake.c
@@ -149,7 +149,7 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data,
   if (result != TSI_OK) {
     security_handshake_done(
         exec_ctx, h,
-        grpc_set_tsi_error_bits(
+        grpc_set_tsi_error_result(
             GRPC_ERROR_CREATE("Frame protector creation failed"), result));
     return;
   }
@@ -168,7 +168,7 @@ static void check_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) {
 
   if (result != TSI_OK) {
     security_handshake_done(
-        exec_ctx, h, grpc_set_tsi_error_bits(
+        exec_ctx, h, grpc_set_tsi_error_result(
                          GRPC_ERROR_CREATE("Peer extraction failed"), result));
     return;
   }
@@ -195,9 +195,9 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx,
   } while (result == TSI_INCOMPLETE_DATA);
 
   if (result != TSI_OK) {
-    security_handshake_done(
-        exec_ctx, h,
-        grpc_set_tsi_error_bits(GRPC_ERROR_CREATE("Handshake failed"), result));
+    security_handshake_done(exec_ctx, h,
+                            grpc_set_tsi_error_result(
+                                GRPC_ERROR_CREATE("Handshake failed"), result));
     return;
   }
 
@@ -249,9 +249,9 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx,
   }
 
   if (result != TSI_OK) {
-    security_handshake_done(
-        exec_ctx, h,
-        grpc_set_tsi_error_bits(GRPC_ERROR_CREATE("Handshake failed"), result));
+    security_handshake_done(exec_ctx, h,
+                            grpc_set_tsi_error_result(
+                                GRPC_ERROR_CREATE("Handshake failed"), result));
     return;
   }
 
diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c
index 072d468415..97302a2328 100644
--- a/src/core/lib/security/transport/secure_endpoint.c
+++ b/src/core/lib/security/transport/secure_endpoint.c
@@ -211,7 +211,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data,
 
   if (result != TSI_OK) {
     gpr_slice_buffer_reset_and_unref(ep->read_buffer);
-    call_read_cb(exec_ctx, ep, grpc_set_tsi_error_bits(
+    call_read_cb(exec_ctx, ep, grpc_set_tsi_error_result(
                                    GRPC_ERROR_CREATE("Unwrap failed"), result));
     return;
   }
@@ -321,7 +321,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep,
     gpr_slice_buffer_reset_and_unref(&ep->output_buffer);
     grpc_exec_ctx_sched(
         exec_ctx, cb,
-        grpc_set_tsi_error_bits(GRPC_ERROR_CREATE("Wrap failed"), result),
+        grpc_set_tsi_error_result(GRPC_ERROR_CREATE("Wrap failed"), result),
         NULL);
     return;
   }
diff --git a/src/core/lib/security/transport/tsi_error.c b/src/core/lib/security/transport/tsi_error.c
index b9fb814905..afc1733567 100644
--- a/src/core/lib/security/transport/tsi_error.c
+++ b/src/core/lib/security/transport/tsi_error.c
@@ -33,7 +33,7 @@
 
 #include "src/core/lib/security/transport/tsi_error.h"
 
-grpc_error *grpc_set_tsi_error_bits(grpc_error *error, tsi_result result) {
+grpc_error *grpc_set_tsi_error_result(grpc_error *error, tsi_result result) {
   return grpc_error_set_int(grpc_error_set_str(error, GRPC_ERROR_STR_TSI_ERROR,
                                                tsi_result_to_string(result)),
                             GRPC_ERROR_INT_TSI_CODE, result);
diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h
index 0b691a427a..636fbb89cf 100644
--- a/src/core/lib/security/transport/tsi_error.h
+++ b/src/core/lib/security/transport/tsi_error.h
@@ -37,6 +37,6 @@
 #include "src/core/lib/iomgr/error.h"
 #include "src/core/lib/tsi/transport_security_interface.h"
 
-grpc_error *grpc_set_tsi_error_bits(grpc_error *error, tsi_result result);
+grpc_error *grpc_set_tsi_error_result(grpc_error *error, tsi_result result);
 
 #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */
-- 
GitLab