aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-07-20 09:25:25 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-07-20 09:25:25 -0700
commitb3ce178b28ebb842408f8cdc5b116816a0171095 (patch)
tree20bede771819ac01b6a4d8519637407008ed88e7
parent9317715338d75ab0cb4c0f745a4784eef6338f58 (diff)
clang-format
-rw-r--r--src/core/ext/transport/chttp2/client/insecure/channel_create.c9
-rw-r--r--src/core/ext/transport/chttp2/client/secure/secure_channel_create.c22
-rw-r--r--src/core/ext/transport/chttp2/server/insecure/server_chttp2.c6
-rw-r--r--src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c4
-rw-r--r--src/core/lib/channel/handshaker.c14
-rw-r--r--src/core/lib/channel/handshaker.h11
6 files changed, 28 insertions, 38 deletions
diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c
index 154c4493ff..162cc6bd6a 100644
--- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c
+++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c
@@ -88,7 +88,7 @@ static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg,
}
static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint,
- grpc_channel_args* args, void *user_data) {
+ grpc_channel_args *args, void *user_data) {
connector *c = user_data;
c->result->transport =
grpc_create_chttp2_transport(exec_ctx, args, endpoint, 1);
@@ -114,10 +114,9 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer,
&c->initial_string_sent);
} else {
- grpc_handshake_manager_do_handshake(exec_ctx, c->handshake_mgr, tcp,
- c->args.channel_args,
- c->args.deadline, on_handshake_done,
- c);
+ grpc_handshake_manager_do_handshake(
+ exec_ctx, c->handshake_mgr, tcp, c->args.channel_args,
+ c->args.deadline, on_handshake_done, c);
}
} else {
memset(c->result, 0, sizeof(*c->result));
diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
index 4554c33c8c..dde35f253d 100644
--- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
+++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
@@ -74,7 +74,7 @@ typedef struct {
grpc_handshake_manager *handshake_mgr;
// TODO(roth): Remove once we eliminate on_secure_handshake_done().
- grpc_channel_args* tmp_args;
+ grpc_channel_args *tmp_args;
} connector;
static void connector_ref(grpc_connector *con) {
@@ -117,8 +117,8 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
grpc_chttp2_transport_start_reading(exec_ctx, c->result->transport, NULL,
0);
auth_context_arg = grpc_auth_context_to_arg(auth_context);
- c->result->channel_args = grpc_channel_args_copy_and_add(
- c->tmp_args, &auth_context_arg, 1);
+ c->result->channel_args =
+ grpc_channel_args_copy_and_add(c->tmp_args, &auth_context_arg, 1);
}
grpc_closure *notify = c->notify;
c->notify = NULL;
@@ -126,7 +126,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg,
}
static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint,
- grpc_channel_args* args, void *user_data) {
+ grpc_channel_args *args, void *user_data) {
connector *c = user_data;
// TODO(roth, jboeuf): Convert security connector handshaking to use new
// handshake API, and then move the code from on_secure_handshake_done()
@@ -140,10 +140,9 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint,
static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg,
grpc_error *error) {
connector *c = arg;
- grpc_handshake_manager_do_handshake(exec_ctx, c->handshake_mgr,
- c->connecting_endpoint,
- c->args.channel_args, c->args.deadline,
- on_handshake_done, c);
+ grpc_handshake_manager_do_handshake(
+ exec_ctx, c->handshake_mgr, c->connecting_endpoint, c->args.channel_args,
+ c->args.deadline, on_handshake_done, c);
}
static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
@@ -163,10 +162,9 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {
grpc_endpoint_write(exec_ctx, tcp, &c->initial_string_buffer,
&c->initial_string_sent);
} else {
- grpc_handshake_manager_do_handshake(exec_ctx, c->handshake_mgr, tcp,
- c->args.channel_args,
- c->args.deadline, on_handshake_done,
- c);
+ grpc_handshake_manager_do_handshake(
+ exec_ctx, c->handshake_mgr, tcp, c->args.channel_args,
+ c->args.deadline, on_handshake_done, c);
}
} else {
memset(c->result, 0, sizeof(*c->result));
diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
index 920875f694..b8d816c127 100644
--- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
+++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
@@ -55,7 +55,7 @@ typedef struct server_connect_state {
} server_connect_state;
static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint,
- grpc_channel_args* args, void *user_data) {
+ grpc_channel_args *args, void *user_data) {
server_connect_state *state = user_data;
/*
* Beware that the call to grpc_create_chttp2_transport() has to happen before
@@ -64,8 +64,8 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint,
* (as in server_secure_chttp2.c) needs to add synchronization to avoid this
* case.
*/
- grpc_transport *transport = grpc_create_chttp2_transport(
- exec_ctx, args, endpoint, 0);
+ grpc_transport *transport =
+ grpc_create_chttp2_transport(exec_ctx, args, endpoint, 0);
grpc_server_setup_transport(exec_ctx, state->server, transport,
state->accepting_pollset,
grpc_server_get_channel_args(state->server));
diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
index e3184bc1f9..bc714f4e5b 100644
--- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
+++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c
@@ -74,7 +74,7 @@ typedef struct server_secure_connect {
// TODO(roth): Remove the following two fields when we eliminate
// grpc_server_security_connector_do_handshake().
gpr_timespec deadline;
- grpc_channel_args* args;
+ grpc_channel_args *args;
} server_secure_connect;
static void state_ref(server_secure_state *state) { gpr_ref(&state->refcount); }
@@ -129,7 +129,7 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *statep,
}
static void on_handshake_done(grpc_exec_ctx *exec_ctx, grpc_endpoint *endpoint,
- grpc_channel_args* args, void *user_data) {
+ grpc_channel_args *args, void *user_data) {
server_secure_connect *state = user_data;
// TODO(roth, jboeuf): Convert security connector handshaking to use new
// handshake API, and then move the code from on_secure_handshake_done()
diff --git a/src/core/lib/channel/handshaker.c b/src/core/lib/channel/handshaker.c
index 7dcbe1df9c..9191ae6339 100644
--- a/src/core/lib/channel/handshaker.c
+++ b/src/core/lib/channel/handshaker.c
@@ -129,8 +129,7 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx,
// handshakers together.
static void call_next_handshaker(grpc_exec_ctx* exec_ctx,
grpc_endpoint* endpoint,
- grpc_channel_args* args,
- void* user_data) {
+ grpc_channel_args* args, void* user_data) {
grpc_handshake_manager* mgr = user_data;
GPR_ASSERT(mgr->state != NULL);
GPR_ASSERT(mgr->state->index < mgr->count);
@@ -153,13 +152,10 @@ static void call_next_handshaker(grpc_exec_ctx* exec_ctx,
}
}
-void grpc_handshake_manager_do_handshake(grpc_exec_ctx* exec_ctx,
- grpc_handshake_manager* mgr,
- grpc_endpoint* endpoint,
- const grpc_channel_args* args,
- gpr_timespec deadline,
- grpc_handshaker_done_cb cb,
- void* user_data) {
+void grpc_handshake_manager_do_handshake(
+ grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr,
+ grpc_endpoint* endpoint, const grpc_channel_args* args,
+ gpr_timespec deadline, grpc_handshaker_done_cb cb, void* user_data) {
grpc_channel_args* args_copy = grpc_channel_args_copy(args);
if (mgr->count == 0) {
// No handshakers registered, so we just immediately call the done
diff --git a/src/core/lib/channel/handshaker.h b/src/core/lib/channel/handshaker.h
index 6a39529150..b8aa78c245 100644
--- a/src/core/lib/channel/handshaker.h
+++ b/src/core/lib/channel/handshaker.h
@@ -131,12 +131,9 @@ void grpc_handshake_manager_shutdown(grpc_exec_ctx* exec_ctx,
/// invoking the first handshaker.
/// If successful, invokes \a cb with \a user_data after all handshakers
/// have completed.
-void grpc_handshake_manager_do_handshake(grpc_exec_ctx* exec_ctx,
- grpc_handshake_manager* mgr,
- grpc_endpoint* endpoint,
- const grpc_channel_args* args,
- gpr_timespec deadline,
- grpc_handshaker_done_cb cb,
- void* user_data);
+void grpc_handshake_manager_do_handshake(
+ grpc_exec_ctx* exec_ctx, grpc_handshake_manager* mgr,
+ grpc_endpoint* endpoint, const grpc_channel_args* args,
+ gpr_timespec deadline, grpc_handshaker_done_cb cb, void* user_data);
#endif /* GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H */