clang-format

pull/7024/head
Mark D. Roth 9 years ago
parent 5d11e43ce3
commit 76d24420d7
  1. 4
      src/core/ext/census/grpc_filter.c
  2. 2
      src/core/ext/client_config/client_channel.c
  3. 8
      src/core/ext/client_config/subchannel.c
  4. 2
      src/core/ext/client_config/subchannel.h
  5. 8
      src/core/ext/client_config/subchannel_call_holder.c
  6. 2
      src/core/ext/load_reporting/load_reporting_filter.c
  7. 8
      src/core/lib/channel/channel_stack.c
  8. 4
      src/core/lib/channel/channel_stack.h
  9. 2
      src/core/lib/channel/compress_filter.c
  10. 7
      src/core/lib/channel/connected_channel.c
  11. 2
      src/core/lib/channel/http_client_filter.c
  12. 2
      src/core/lib/channel/http_server_filter.c
  13. 2
      src/core/lib/security/transport/client_auth_filter.c
  14. 2
      src/core/lib/security/transport/server_auth_filter.c
  15. 13
      src/core/lib/surface/call.c
  16. 2
      src/core/lib/surface/lame_client.c
  17. 2
      src/core/lib/surface/server.c
  18. 8
      test/core/channel/channel_stack_test.c
  19. 2
      test/core/end2end/tests/filter_call_init_fails.c
  20. 2
      test/core/end2end/tests/filter_causes_close.c

@ -124,7 +124,7 @@ static void server_start_transport_op(grpc_exec_ctx *exec_ctx,
grpc_call_next_op(exec_ctx, elem, op);
}
static grpc_error* client_init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *client_init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *d = elem->call_data;
@ -143,7 +143,7 @@ static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx,
/* TODO(hongyu): record rpc client stats and census_rpc_end_op here */
}
static grpc_error* server_init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *server_init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *d = elem->call_data;

@ -430,7 +430,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
grpc_subchannel_call_holder_init(elem->call_data, cc_pick_subchannel, elem,

@ -708,11 +708,11 @@ grpc_error *grpc_connected_subchannel_create_call(
grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call);
(*call)->connection = con;
GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call");
grpc_error* error = grpc_call_stack_init(exec_ctx, chanstk, 1,
subchannel_call_destroy, *call,
NULL, NULL, callstk);
grpc_error *error =
grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call,
NULL, NULL, callstk);
if (error != GRPC_ERROR_NONE) {
const char* error_string = grpc_error_string(error);
const char *error_string = grpc_error_string(error);
gpr_log(GPR_ERROR, "error: %s", error_string);
grpc_error_free_string(error_string);
return error;

@ -110,7 +110,7 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx,
/** construct a subchannel call */
grpc_error *grpc_connected_subchannel_create_call(
grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel,
grpc_polling_entity *pollent, grpc_subchannel_call** subchannel_call);
grpc_polling_entity *pollent, grpc_subchannel_call **subchannel_call);
/** process a transport level op */
void grpc_connected_subchannel_process_transport_op(

@ -167,8 +167,8 @@ retry:
/* if we've got a subchannel, then let's ask it to create a call */
if (holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING &&
holder->connected_subchannel != NULL) {
grpc_subchannel_call* subchannel_call = NULL;
grpc_error* error = grpc_connected_subchannel_create_call(
grpc_subchannel_call *subchannel_call = NULL;
grpc_error *error = grpc_connected_subchannel_create_call(
exec_ctx, holder->connected_subchannel, holder->pollent,
&subchannel_call);
if (error != GRPC_ERROR_NONE) {
@ -205,8 +205,8 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg,
GRPC_ERROR_CREATE_REFERENCING(
"Cancelled before creating subchannel", &error, 1));
} else {
grpc_subchannel_call* subchannel_call = NULL;
grpc_error* new_error = grpc_connected_subchannel_create_call(
grpc_subchannel_call *subchannel_call = NULL;
grpc_error *new_error = grpc_connected_subchannel_create_call(
exec_ctx, holder->connected_subchannel, holder->pollent,
&subchannel_call);
if (new_error != GRPC_ERROR_NONE) {

@ -56,7 +56,7 @@ static void invoke_lr_fn_locked(grpc_load_reporting_config *lrc,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;

@ -157,7 +157,7 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx,
}
}
grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
grpc_error *grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
grpc_channel_stack *channel_stack,
int initial_refs, grpc_iomgr_cb_func destroy,
void *destroy_arg,
@ -179,7 +179,7 @@ grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element));
/* init per-filter data */
grpc_error* first_error = GRPC_ERROR_NONE;
grpc_error *first_error = GRPC_ERROR_NONE;
for (i = 0; i < count; i++) {
args.call_stack = call_stack;
args.server_transport_data = transport_server_data;
@ -187,8 +187,8 @@ grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
call_elems[i].filter = channel_elems[i].filter;
call_elems[i].channel_data = channel_elems[i].channel_data;
call_elems[i].call_data = user_data;
grpc_error* error = call_elems[i].filter->init_call_elem(
exec_ctx, &call_elems[i], &args);
grpc_error *error =
call_elems[i].filter->init_call_elem(exec_ctx, &call_elems[i], &args);
if (error != GRPC_ERROR_NONE && first_error == GRPC_ERROR_NONE)
first_error = error;
user_data +=

@ -110,7 +110,7 @@ typedef struct {
on a client; if it is non-NULL, then it points to memory owned by the
transport and is on the server. Most filters want to ignore this
argument. */
grpc_error* (*init_call_elem)(grpc_exec_ctx *exec_ctx,
grpc_error *(*init_call_elem)(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args);
void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx,
@ -210,7 +210,7 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx,
/* Initialize a call stack given a channel stack. transport_server_data is
expected to be NULL on a client, or an opaque transport owned pointer on the
server. */
grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
grpc_error *grpc_call_stack_init(grpc_exec_ctx *exec_ctx,
grpc_channel_stack *channel_stack,
int initial_refs, grpc_iomgr_cb_func destroy,
void *destroy_arg,

@ -256,7 +256,7 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
/* grab pointers to our data from the call element */

@ -81,7 +81,7 @@ static void con_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;
@ -89,9 +89,8 @@ static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
int r = grpc_transport_init_stream(
exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld),
&args->call_stack->refcount, args->server_transport_data);
return r == 0
? GRPC_ERROR_NONE
: GRPC_ERROR_CREATE("transport initialization failed");
return r == 0 ? GRPC_ERROR_NONE
: GRPC_ERROR_CREATE("transport initialization failed");
}
static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx,

@ -169,7 +169,7 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;

@ -224,7 +224,7 @@ static void hs_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
/* grab pointers to our data from the call element */

@ -264,7 +264,7 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;

@ -199,7 +199,7 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx,
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
/* grab pointers to our data from the call element */

@ -262,18 +262,17 @@ grpc_call *grpc_call_create(
call->send_deadline = send_deadline;
GRPC_CHANNEL_INTERNAL_REF(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,
server_transport_data,
CALL_STACK_FROM_CALL(call));
grpc_error *error = grpc_call_stack_init(
&exec_ctx, channel_stack, 1, destroy_call, call, call->context,
server_transport_data, CALL_STACK_FROM_CALL(call));
if (error != GRPC_ERROR_NONE) {
intptr_t status;
if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status))
status = GRPC_STATUS_UNKNOWN;
const char* error_str = grpc_error_get_str(error,
GRPC_ERROR_STR_DESCRIPTION);
const char *error_str =
grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION);
close_with_status(&exec_ctx, call, status,
error_str == NULL ? "unknown error" : error_str);
error_str == NULL ? "unknown error" : error_str);
grpc_error_unref(error);
}
if (cq != NULL) {

@ -107,7 +107,7 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx,
GRPC_ERROR_UNREF(op->disconnect_with_error);
}
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
return GRPC_ERROR_NONE;

@ -848,7 +848,7 @@ static void channel_connectivity_changed(grpc_exec_ctx *exec_ctx, void *cd,
}
}
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
call_data *calld = elem->call_data;

@ -53,7 +53,7 @@ static void channel_init_func(grpc_exec_ctx *exec_ctx,
*(int *)(elem->channel_data) = 0;
}
static grpc_error* call_init_func(grpc_exec_ctx *exec_ctx,
static grpc_error *call_init_func(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
++*(int *)(elem->channel_data);
@ -134,9 +134,9 @@ 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,
call_stack);
grpc_error *error =
grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack,
NULL, NULL, call_stack);
GPR_ASSERT(error == GRPC_ERROR_NONE);
GPR_ASSERT(call_stack->count == 1);
call_elem = grpc_call_stack_element(call_stack, 0);

@ -200,7 +200,7 @@ static void test_request(grpc_end2end_test_config config) {
* Test filter - always fails to initialize a call
*/
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
return grpc_error_set_int(GRPC_ERROR_CREATE("access denied"),

@ -233,7 +233,7 @@ static void start_transport_stream_op(grpc_exec_ctx *exec_ctx,
grpc_call_next_op(exec_ctx, elem, op);
}
static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx,
static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx,
grpc_call_element *elem,
grpc_call_element_args *args) {
return GRPC_ERROR_NONE;

Loading…
Cancel
Save