clang-format

pull/8662/head
Mark D. Roth 8 years ago
parent 3d88341c54
commit 859cce41dc
  1. 9
      src/core/lib/surface/call.c
  2. 8
      test/core/channel/channel_stack_test.c
  3. 26
      test/core/end2end/tests/filter_latency.c

@ -313,11 +313,10 @@ grpc_error *grpc_call_create(const grpc_call_create_args *args,
GRPC_CHANNEL_INTERNAL_REF(args->channel, "call");
/* initial refcount dropped by grpc_call_destroy */
grpc_error *error =
grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call,
call->context, args->server_transport_data, path,
call->start_time, send_deadline,
CALL_STACK_FROM_CALL(call));
grpc_error *error = grpc_call_stack_init(
&exec_ctx, channel_stack, 1, destroy_call, call, call->context,
args->server_transport_data, path, call->start_time, send_deadline,
CALL_STACK_FROM_CALL(call));
if (error != GRPC_ERROR_NONE) {
grpc_status_code status;
const char *error_str;

@ -136,10 +136,10 @@ static void test_create_channel_stack(void) {
GPR_ASSERT(*channel_data == 0);
call_stack = gpr_malloc(channel_stack->call_stack_size);
grpc_error *error = grpc_call_stack_init(
&exec_ctx, channel_stack, 1, free_call, call_stack, NULL, NULL, path,
gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC),
call_stack);
grpc_error *error =
grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack,
NULL, NULL, path, gpr_now(GPR_CLOCK_MONOTONIC),
gpr_inf_future(GPR_CLOCK_MONOTONIC), call_stack);
GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(call_stack->count == 1);
call_elem = grpc_call_stack_element(call_stack, 0);

@ -250,15 +250,17 @@ static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
return GRPC_ERROR_NONE;
}
static void client_destroy_call_elem(
grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_final_info *final_info, void *and_free_memory) {
static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
const grpc_call_final_info *final_info,
void *and_free_memory) {
g_client_latency = final_info->stats.latency;
}
static void server_destroy_call_elem(
grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
const grpc_call_final_info *final_info, void *and_free_memory) {
static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
const grpc_call_final_info *final_info,
void *and_free_memory) {
g_server_latency = final_info->stats.latency;
}
@ -300,7 +302,7 @@ static const grpc_channel_filter test_server_filter = {
*/
static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
grpc_channel_filter* filter = arg;
grpc_channel_filter *filter = arg;
if (g_enable_filter) {
// Want to add the filter as close to the end as possible, to make
// sure that all of the filters work well together. However, we
@ -309,8 +311,8 @@ static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
grpc_channel_stack_builder_iterator *it =
grpc_channel_stack_builder_create_iterator_at_last(builder);
GPR_ASSERT(grpc_channel_stack_builder_move_prev(it));
const bool retval = grpc_channel_stack_builder_add_filter_before(
it, filter, NULL, NULL);
const bool retval =
grpc_channel_stack_builder_add_filter_before(it, filter, NULL, NULL);
grpc_channel_stack_builder_iterator_destroy(it);
return retval;
} else {
@ -320,9 +322,11 @@ static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) {
static void init_plugin(void) {
grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
maybe_add_filter, (void*)&test_client_filter);
maybe_add_filter,
(void *)&test_client_filter);
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX,
maybe_add_filter, (void*)&test_server_filter);
maybe_add_filter,
(void *)&test_server_filter);
}
static void destroy_plugin(void) {}

Loading…
Cancel
Save