|
|
@ -42,6 +42,7 @@ |
|
|
|
namespace { |
|
|
|
namespace { |
|
|
|
/* We can have a per-call credentials. */ |
|
|
|
/* We can have a per-call credentials. */ |
|
|
|
struct call_data { |
|
|
|
struct call_data { |
|
|
|
|
|
|
|
gpr_arena* arena; |
|
|
|
grpc_call_stack* owning_call; |
|
|
|
grpc_call_stack* owning_call; |
|
|
|
grpc_call_combiner* call_combiner; |
|
|
|
grpc_call_combiner* call_combiner; |
|
|
|
grpc_call_credentials* creds; |
|
|
|
grpc_call_credentials* creds; |
|
|
@ -276,10 +277,12 @@ static void auth_start_transport_stream_op_batch( |
|
|
|
channel_data* chand = static_cast<channel_data*>(elem->channel_data); |
|
|
|
channel_data* chand = static_cast<channel_data*>(elem->channel_data); |
|
|
|
|
|
|
|
|
|
|
|
if (!batch->cancel_stream) { |
|
|
|
if (!batch->cancel_stream) { |
|
|
|
|
|
|
|
// TODO(hcaseyal): move this to init_call_elem once issue #15927 is
|
|
|
|
|
|
|
|
// resolved.
|
|
|
|
GPR_ASSERT(batch->payload->context != nullptr); |
|
|
|
GPR_ASSERT(batch->payload->context != nullptr); |
|
|
|
if (batch->payload->context[GRPC_CONTEXT_SECURITY].value == nullptr) { |
|
|
|
if (batch->payload->context[GRPC_CONTEXT_SECURITY].value == nullptr) { |
|
|
|
batch->payload->context[GRPC_CONTEXT_SECURITY].value = |
|
|
|
batch->payload->context[GRPC_CONTEXT_SECURITY].value = |
|
|
|
grpc_client_security_context_create(); |
|
|
|
grpc_client_security_context_create(calld->arena); |
|
|
|
batch->payload->context[GRPC_CONTEXT_SECURITY].destroy = |
|
|
|
batch->payload->context[GRPC_CONTEXT_SECURITY].destroy = |
|
|
|
grpc_client_security_context_destroy; |
|
|
|
grpc_client_security_context_destroy; |
|
|
|
} |
|
|
|
} |
|
|
@ -335,6 +338,7 @@ static void auth_start_transport_stream_op_batch( |
|
|
|
static grpc_error* init_call_elem(grpc_call_element* elem, |
|
|
|
static grpc_error* init_call_elem(grpc_call_element* elem, |
|
|
|
const grpc_call_element_args* args) { |
|
|
|
const grpc_call_element_args* args) { |
|
|
|
call_data* calld = static_cast<call_data*>(elem->call_data); |
|
|
|
call_data* calld = static_cast<call_data*>(elem->call_data); |
|
|
|
|
|
|
|
calld->arena = args->arena; |
|
|
|
calld->owning_call = args->call_stack; |
|
|
|
calld->owning_call = args->call_stack; |
|
|
|
calld->call_combiner = args->call_combiner; |
|
|
|
calld->call_combiner = args->call_combiner; |
|
|
|
calld->host = grpc_empty_slice(); |
|
|
|
calld->host = grpc_empty_slice(); |
|
|
|