aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-12-01 22:52:20 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-12-01 22:52:20 +0100
commitba404826be4720fc46ae161f950e27814928d5c5 (patch)
treeae21ff387782aaffab6e0c3cccd9aab6d629acfd /src/core
parent3e5cbee777cfd1d05f1161dfb97093878c7e48ed (diff)
Clang format.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/channel/client_uchannel.c14
-rw-r--r--src/core/security/client_auth_filter.c4
-rw-r--r--src/core/security/credentials.c1
-rw-r--r--src/core/security/credentials.h13
-rw-r--r--src/core/security/google_default_credentials.c3
-rw-r--r--src/core/security/security_connector.c6
-rw-r--r--src/core/security/security_context.c6
-rw-r--r--src/core/security/server_auth_filter.c3
-rw-r--r--src/core/security/server_secure_chttp2.c3
-rw-r--r--src/core/surface/byte_buffer_reader.c1
-rw-r--r--src/core/surface/call_test_only.h1
11 files changed, 21 insertions, 34 deletions
diff --git a/src/core/channel/client_uchannel.c b/src/core/channel/client_uchannel.c
index 510677a844..19a8fa1f79 100644
--- a/src/core/channel/client_uchannel.c
+++ b/src/core/channel/client_uchannel.c
@@ -172,7 +172,7 @@ static void monitor_subchannel(grpc_exec_ctx *exec_ctx, void *arg,
}
static void started_call_locked(grpc_exec_ctx *exec_ctx, void *arg,
- int iomgr_success) {
+ int iomgr_success) {
call_data *calld = arg;
grpc_transport_stream_op op;
int have_waiting;
@@ -466,15 +466,9 @@ static void cuc_destroy_channel_elem(grpc_exec_ctx *exec_ctx,
}
const grpc_channel_filter grpc_client_uchannel_filter = {
- cuc_start_transport_stream_op,
- cuc_start_transport_op,
- sizeof(call_data),
- cuc_init_call_elem,
- cuc_destroy_call_elem,
- sizeof(channel_data),
- cuc_init_channel_elem,
- cuc_destroy_channel_elem,
- cuc_get_peer,
+ cuc_start_transport_stream_op, cuc_start_transport_op, sizeof(call_data),
+ cuc_init_call_elem, cuc_destroy_call_elem, sizeof(channel_data),
+ cuc_init_channel_elem, cuc_destroy_channel_elem, cuc_get_peer,
"client-uchannel",
};
diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c
index e7057051e0..18f18410d5 100644
--- a/src/core/security/client_auth_filter.c
+++ b/src/core/security/client_auth_filter.c
@@ -152,8 +152,8 @@ void build_auth_metadata_context(grpc_security_connector *sc,
grpc_mdstr_as_c_string(calld->host), service);
calld->auth_md_context.service_url = service_url;
calld->auth_md_context.method_name = method_name;
- calld->auth_md_context.channel_auth_context = GRPC_AUTH_CONTEXT_REF(
- sc->auth_context, "grpc_auth_metadata_context");
+ calld->auth_md_context.channel_auth_context =
+ GRPC_AUTH_CONTEXT_REF(sc->auth_context, "grpc_auth_metadata_context");
gpr_free(service);
}
diff --git a/src/core/security/credentials.c b/src/core/security/credentials.c
index 751665b494..543c75044b 100644
--- a/src/core/security/credentials.c
+++ b/src/core/security/credentials.c
@@ -1272,4 +1272,3 @@ grpc_channel_credentials *grpc_composite_channel_credentials_create(
c->call_creds = grpc_call_credentials_ref(call_creds);
return &c->base;
}
-
diff --git a/src/core/security/credentials.h b/src/core/security/credentials.h
index 0ce33d5e7c..96135f4776 100644
--- a/src/core/security/credentials.h
+++ b/src/core/security/credentials.h
@@ -174,19 +174,18 @@ struct grpc_call_credentials {
grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds);
void grpc_call_credentials_unref(grpc_call_credentials *creds);
-void grpc_call_credentials_get_request_metadata(grpc_exec_ctx *exec_ctx,
- grpc_call_credentials *creds,
- grpc_pollset *pollset,
- grpc_auth_metadata_context context,
- grpc_credentials_metadata_cb cb,
- void *user_data);
+void grpc_call_credentials_get_request_metadata(
+ grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds,
+ grpc_pollset *pollset, grpc_auth_metadata_context context,
+ grpc_credentials_metadata_cb cb, void *user_data);
typedef struct {
grpc_call_credentials **creds_array;
size_t num_creds;
} grpc_call_credentials_array;
-const grpc_call_credentials_array *grpc_composite_call_credentials_get_credentials(
+const grpc_call_credentials_array *
+grpc_composite_call_credentials_get_credentials(
grpc_call_credentials *composite_creds);
/* Returns creds if creds is of the specified type or the inner creds of the
diff --git a/src/core/security/google_default_credentials.c b/src/core/security/google_default_credentials.c
index e5a810f23c..6a54fe4e47 100644
--- a/src/core/security/google_default_credentials.c
+++ b/src/core/security/google_default_credentials.c
@@ -214,7 +214,8 @@ grpc_channel_credentials *grpc_google_default_credentials_create(void) {
end:
if (result == NULL) {
if (call_creds != NULL) {
- /* Blend with default ssl credentials and add a global reference so that it
+ /* Blend with default ssl credentials and add a global reference so that
+ it
can be cached and re-served. */
grpc_channel_credentials *ssl_creds =
grpc_ssl_credentials_create(NULL, NULL, NULL);
diff --git a/src/core/security/security_connector.c b/src/core/security/security_connector.c
index 8dbacdd35e..3c54a4deae 100644
--- a/src/core/security/security_connector.c
+++ b/src/core/security/security_connector.c
@@ -571,9 +571,9 @@ size_t grpc_get_default_ssl_roots(const unsigned char **pem_root_certs) {
}
grpc_security_status grpc_ssl_channel_security_connector_create(
- grpc_call_credentials *request_metadata_creds, const grpc_ssl_config *config,
- const char *target_name, const char *overridden_target_name,
- grpc_channel_security_connector **sc) {
+ grpc_call_credentials *request_metadata_creds,
+ const grpc_ssl_config *config, const char *target_name,
+ const char *overridden_target_name, grpc_channel_security_connector **sc) {
size_t num_alpn_protocols = grpc_chttp2_num_alpn_versions();
const unsigned char **alpn_protocol_strings =
gpr_malloc(sizeof(const char *) * num_alpn_protocols);
diff --git a/src/core/security/security_context.c b/src/core/security/security_context.c
index 56c56a9506..2068c97d78 100644
--- a/src/core/security/security_context.c
+++ b/src/core/security/security_context.c
@@ -320,8 +320,7 @@ grpc_arg grpc_auth_context_to_arg(grpc_auth_context *p) {
return arg;
}
-grpc_auth_context *grpc_auth_context_from_arg(
- const grpc_arg *arg) {
+grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg) {
if (strcmp(arg->key, GRPC_AUTH_CONTEXT_ARG) != 0) return NULL;
if (arg->type != GRPC_ARG_POINTER) {
gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type,
@@ -336,8 +335,7 @@ grpc_auth_context *grpc_find_auth_context_in_args(
size_t i;
if (args == NULL) return NULL;
for (i = 0; i < args->num_args; i++) {
- grpc_auth_context *p =
- grpc_auth_context_from_arg(&args->args[i]);
+ grpc_auth_context *p = grpc_auth_context_from_arg(&args->args[i]);
if (p != NULL) return p;
}
return NULL;
diff --git a/src/core/security/server_auth_filter.c b/src/core/security/server_auth_filter.c
index 2e18369fe8..67b3826162 100644
--- a/src/core/security/server_auth_filter.c
+++ b/src/core/security/server_auth_filter.c
@@ -220,8 +220,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
initial_op->context[GRPC_CONTEXT_SECURITY].value);
}
server_ctx = grpc_server_security_context_create();
- server_ctx->auth_context =
- grpc_auth_context_create(chand->auth_context);
+ server_ctx->auth_context = grpc_auth_context_create(chand->auth_context);
server_ctx->auth_context->pollset = initial_op->bind_pollset;
initial_op->context[GRPC_CONTEXT_SECURITY].value = server_ctx;
initial_op->context[GRPC_CONTEXT_SECURITY].destroy =
diff --git a/src/core/security/server_secure_chttp2.c b/src/core/security/server_secure_chttp2.c
index 82c639e830..851e0cfab3 100644
--- a/src/core/security/server_secure_chttp2.c
+++ b/src/core/security/server_secure_chttp2.c
@@ -94,8 +94,7 @@ static void setup_transport(grpc_exec_ctx *exec_ctx, void *statep,
grpc_channel_args *args_copy;
grpc_arg args_to_add[2];
args_to_add[0] = grpc_server_credentials_to_arg(state->creds);
- args_to_add[1] =
- grpc_auth_context_to_arg(state->sc->auth_context);
+ args_to_add[1] = grpc_auth_context_to_arg(state->sc->auth_context);
args_copy = grpc_channel_args_copy_and_add(
grpc_server_get_channel_args(state->server), args_to_add,
GPR_ARRAY_SIZE(args_to_add));
diff --git a/src/core/surface/byte_buffer_reader.c b/src/core/surface/byte_buffer_reader.c
index 9f830df68c..57417f41b0 100644
--- a/src/core/surface/byte_buffer_reader.c
+++ b/src/core/surface/byte_buffer_reader.c
@@ -121,4 +121,3 @@ gpr_slice grpc_byte_buffer_reader_readall(grpc_byte_buffer_reader *reader) {
}
return out_slice;
}
-
diff --git a/src/core/surface/call_test_only.h b/src/core/surface/call_test_only.h
index df4be3248b..b3a2bbd6f1 100644
--- a/src/core/surface/call_test_only.h
+++ b/src/core/surface/call_test_only.h
@@ -57,7 +57,6 @@ gpr_uint32 grpc_call_test_only_get_message_flags(grpc_call *call);
* To be indexed by grpc_compression_algorithm enum values. */
gpr_uint32 grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call *call);
-
#ifdef __cplusplus
}
#endif