clang-format

pull/7395/head
Mark D. Roth 8 years ago
parent 9317715338
commit b3ce178b28
  1. 7
      src/core/ext/transport/chttp2/client/insecure/channel_create.c
  2. 18
      src/core/ext/transport/chttp2/client/secure/secure_channel_create.c
  3. 4
      src/core/ext/transport/chttp2/server/insecure/server_chttp2.c
  4. 14
      src/core/lib/channel/handshaker.c
  5. 11
      src/core/lib/channel/handshaker.h

@ -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));

@ -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;
@ -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));

@ -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));

@ -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

@ -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 */

Loading…
Cancel
Save