diff options
Diffstat (limited to 'src/csharp/ext/grpc_csharp_ext.c')
-rw-r--r-- | src/csharp/ext/grpc_csharp_ext.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 219f6d7d73..49a0471042 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -169,7 +169,7 @@ grpcsharp_metadata_array_add(grpc_metadata_array *array, const char *key, GPR_EXPORT gpr_intptr GPR_CALLTYPE grpcsharp_metadata_array_count(grpc_metadata_array *array) { - return (gpr_intptr) array->count; + return (gpr_intptr)array->count; } GPR_EXPORT const char *GPR_CALLTYPE @@ -184,10 +184,10 @@ grpcsharp_metadata_array_get_value(grpc_metadata_array *array, size_t index) { return array->metadata[index].value; } -GPR_EXPORT gpr_intptr GPR_CALLTYPE -grpcsharp_metadata_array_get_value_length(grpc_metadata_array *array, size_t index) { +GPR_EXPORT gpr_intptr GPR_CALLTYPE grpcsharp_metadata_array_get_value_length( + grpc_metadata_array *array, size_t index) { GPR_ASSERT(index < array->count); - return (gpr_intptr) array->metadata[index].value_length; + return (gpr_intptr)array->metadata[index].value_length; } /* Move contents of metadata array */ @@ -306,8 +306,7 @@ grpcsharp_batch_context_server_rpc_new_method( return ctx->server_rpc_new.call_details.method; } -GPR_EXPORT const char *GPR_CALLTYPE -grpcsharp_batch_context_server_rpc_new_host( +GPR_EXPORT const char *GPR_CALLTYPE grpcsharp_batch_context_server_rpc_new_host( const grpcsharp_batch_context *ctx) { return ctx->server_rpc_new.call_details.host; } @@ -657,20 +656,17 @@ grpcsharp_call_send_close_from_client(grpc_call *call, return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx); } -GPR_EXPORT grpc_call_error GPR_CALLTYPE -grpcsharp_call_send_status_from_server(grpc_call *call, - grpcsharp_batch_context *ctx, - grpc_status_code status_code, - const char *status_details, - grpc_metadata_array *trailing_metadata) { +GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( + grpc_call *call, grpcsharp_batch_context *ctx, grpc_status_code status_code, + const char *status_details, grpc_metadata_array *trailing_metadata) { /* TODO: don't use magic number */ grpc_op ops[1]; ops[0].op = GRPC_OP_SEND_STATUS_FROM_SERVER; ops[0].data.send_status_from_server.status = status_code; ops[0].data.send_status_from_server.status_details = gpr_strdup(status_details); - grpcsharp_metadata_array_move(&(ctx->send_status_from_server.trailing_metadata), - trailing_metadata); + grpcsharp_metadata_array_move( + &(ctx->send_status_from_server.trailing_metadata), trailing_metadata); ops[0].data.send_status_from_server.trailing_metadata_count = ctx->send_status_from_server.trailing_metadata.count; ops[0].data.send_status_from_server.trailing_metadata = @@ -795,8 +791,9 @@ grpcsharp_ssl_server_credentials_create( key_cert_pairs[i].private_key = key_cert_pair_private_key_array[i]; } } + /* TODO: Add a force_client_auth parameter and pass it here. */ creds = grpc_ssl_server_credentials_create(pem_root_certs, key_cert_pairs, - num_key_cert_pairs); + num_key_cert_pairs, 0); gpr_free(key_cert_pairs); return creds; } |