aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar jtattermusch <jtattermusch@google.com>2014-12-12 15:18:08 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2014-12-12 16:33:33 -0800
commit993dfcef3ea9c511a47c8d7caed8b52e9584abb9 (patch)
treedc13fa709811c3d08ef666db30f54c824a61c9e6
parent1de3a5c0a19d6fef9c6443ff735a54691b6157c9 (diff)
Added endpoint_ prefix to all method functions. On Windows, the shutdown method name collides with shutdown syscall.
Change on 2014/12/12 by jtattermusch <jtattermusch@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82018945
-rw-r--r--src/core/endpoint/secure_endpoint.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/core/endpoint/secure_endpoint.c b/src/core/endpoint/secure_endpoint.c
index ecf41d71a8..964dc826db 100644
--- a/src/core/endpoint/secure_endpoint.c
+++ b/src/core/endpoint/secure_endpoint.c
@@ -99,8 +99,8 @@ static void call_read_cb(secure_endpoint *ep, gpr_slice *slices, size_t nslices,
size_t i;
for (i = 0; i < nslices; i++) {
char *data =
- gpr_hexdump((char*)GPR_SLICE_START_PTR(slices[i]),
- GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
+ gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
+ GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "READ %p: %s", ep, data);
gpr_free(data);
}
@@ -183,8 +183,9 @@ static void on_read(void *user_data, gpr_slice *slices, size_t nslices,
call_read_cb(ep, ep->input_buffer.slices, input_buffer_count, error);
}
-static void notify_on_read(grpc_endpoint *secure_ep, grpc_endpoint_read_cb cb,
- void *user_data, gpr_timespec deadline) {
+static void endpoint_notify_on_read(grpc_endpoint *secure_ep,
+ grpc_endpoint_read_cb cb, void *user_data,
+ gpr_timespec deadline) {
secure_endpoint *ep = (secure_endpoint *)secure_ep;
ep->read_cb = cb;
ep->read_user_data = user_data;
@@ -216,11 +217,9 @@ static void on_write(void *data, grpc_endpoint_cb_status error) {
secure_endpoint_unref(ep);
}
-static grpc_endpoint_write_status write(grpc_endpoint *secure_ep,
- gpr_slice *slices, size_t nslices,
- grpc_endpoint_write_cb cb,
- void *user_data,
- gpr_timespec deadline) {
+static grpc_endpoint_write_status endpoint_write(
+ grpc_endpoint *secure_ep, gpr_slice *slices, size_t nslices,
+ grpc_endpoint_write_cb cb, void *user_data, gpr_timespec deadline) {
int i = 0;
int output_buffer_count = 0;
tsi_result result = TSI_OK;
@@ -233,8 +232,8 @@ static grpc_endpoint_write_status write(grpc_endpoint *secure_ep,
#ifdef GRPC_TRACE_SECURE_TRANSPORT
for (i = 0; i < nslices; i++) {
char *data =
- gpr_hexdump((char*)GPR_SLICE_START_PTR(slices[i]),
- GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
+ gpr_hexdump((char *)GPR_SLICE_START_PTR(slices[i]),
+ GPR_SLICE_LENGTH(slices[i]), GPR_HEXDUMP_PLAINTEXT);
gpr_log(GPR_DEBUG, "WRITE %p: %s", ep, data);
gpr_free(data);
}
@@ -316,18 +315,18 @@ static grpc_endpoint_write_status write(grpc_endpoint *secure_ep,
return status;
}
-static void shutdown(grpc_endpoint *secure_ep) {
+static void endpoint_shutdown(grpc_endpoint *secure_ep) {
secure_endpoint *ep = (secure_endpoint *)secure_ep;
grpc_endpoint_shutdown(ep->wrapped_ep);
}
-static void unref(grpc_endpoint *secure_ep) {
+static void endpoint_unref(grpc_endpoint *secure_ep) {
secure_endpoint *ep = (secure_endpoint *)secure_ep;
secure_endpoint_unref(ep);
}
-static const grpc_endpoint_vtable vtable = {notify_on_read, write, shutdown,
- unref};
+static const grpc_endpoint_vtable vtable = {
+ endpoint_notify_on_read, endpoint_write, endpoint_shutdown, endpoint_unref};
grpc_endpoint *grpc_secure_endpoint_create(
struct tsi_frame_protector *protector, grpc_endpoint *transport,