|
|
@ -45,6 +45,7 @@ struct call_data { |
|
|
|
|
|
|
|
|
|
|
|
struct channel_data { |
|
|
|
struct channel_data { |
|
|
|
grpc_slice default_authority; |
|
|
|
grpc_slice default_authority; |
|
|
|
|
|
|
|
grpc_mdelem default_authority_mdelem; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
void authority_start_transport_stream_op_batch( |
|
|
|
void authority_start_transport_stream_op_batch( |
|
|
@ -59,8 +60,7 @@ void authority_start_transport_stream_op_batch( |
|
|
|
initial_metadata->idx.named.authority == nullptr) { |
|
|
|
initial_metadata->idx.named.authority == nullptr) { |
|
|
|
grpc_error* error = grpc_metadata_batch_add_head( |
|
|
|
grpc_error* error = grpc_metadata_batch_add_head( |
|
|
|
initial_metadata, &calld->authority_storage, |
|
|
|
initial_metadata, &calld->authority_storage, |
|
|
|
grpc_mdelem_create(GRPC_MDSTR_AUTHORITY, chand->default_authority, |
|
|
|
GRPC_MDELEM_REF(chand->default_authority_mdelem)); |
|
|
|
nullptr)); |
|
|
|
|
|
|
|
if (error != GRPC_ERROR_NONE) { |
|
|
|
if (error != GRPC_ERROR_NONE) { |
|
|
|
grpc_transport_stream_op_batch_finish_with_failure(batch, error, |
|
|
|
grpc_transport_stream_op_batch_finish_with_failure(batch, error, |
|
|
|
calld->call_combiner); |
|
|
|
calld->call_combiner); |
|
|
@ -103,6 +103,8 @@ grpc_error* init_channel_elem(grpc_channel_element* elem, |
|
|
|
} |
|
|
|
} |
|
|
|
chand->default_authority = |
|
|
|
chand->default_authority = |
|
|
|
grpc_slice_intern(grpc_slice_from_static_string(default_authority_str)); |
|
|
|
grpc_slice_intern(grpc_slice_from_static_string(default_authority_str)); |
|
|
|
|
|
|
|
chand->default_authority_mdelem = grpc_mdelem_create( |
|
|
|
|
|
|
|
GRPC_MDSTR_AUTHORITY, chand->default_authority, nullptr); |
|
|
|
GPR_ASSERT(!args->is_last); |
|
|
|
GPR_ASSERT(!args->is_last); |
|
|
|
return GRPC_ERROR_NONE; |
|
|
|
return GRPC_ERROR_NONE; |
|
|
|
} |
|
|
|
} |
|
|
@ -111,6 +113,7 @@ grpc_error* init_channel_elem(grpc_channel_element* elem, |
|
|
|
void destroy_channel_elem(grpc_channel_element* elem) { |
|
|
|
void destroy_channel_elem(grpc_channel_element* elem) { |
|
|
|
channel_data* chand = static_cast<channel_data*>(elem->channel_data); |
|
|
|
channel_data* chand = static_cast<channel_data*>(elem->channel_data); |
|
|
|
grpc_slice_unref_internal(chand->default_authority); |
|
|
|
grpc_slice_unref_internal(chand->default_authority); |
|
|
|
|
|
|
|
GRPC_MDELEM_UNREF(chand->default_authority_mdelem); |
|
|
|
} |
|
|
|
} |
|
|
|
} // namespace
|
|
|
|
} // namespace
|
|
|
|
|
|
|
|
|
|
|
|