Renaming remaining filter functions

pull/20271/head
Yash Tibrewal 5 years ago
parent 4001ac37af
commit f1914fba00
  1. 36
      src/core/lib/channel/connected_channel.cc
  2. 16
      src/core/lib/surface/server.cc

@ -97,7 +97,7 @@ static callback_state* get_state_for_batch(
/* Intercept a call operation and either push it directly up or translate it
into transport stream operations */
static void con_start_transport_stream_op_batch(
static void connected_channel_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
call_data* calld = static_cast<call_data*>(elem->call_data);
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
@ -137,15 +137,15 @@ static void con_start_transport_stream_op_batch(
GRPC_CALL_COMBINER_STOP(calld->call_combiner, "passed batch to transport");
}
static void con_start_transport_op(grpc_channel_element* elem,
static void connected_channel_start_transport_op(grpc_channel_element* elem,
grpc_transport_op* op) {
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
grpc_transport_perform_op(chand->transport, op);
}
/* Constructor for call_data */
static grpc_error* init_call_elem(grpc_call_element* elem,
const grpc_call_element_args* args) {
static grpc_error* connected_channel_init_call_elem(
grpc_call_element* elem, const grpc_call_element_args* args) {
call_data* calld = static_cast<call_data*>(elem->call_data);
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
calld->call_combiner = args->call_combiner;
@ -166,8 +166,8 @@ static void set_pollset_or_pollset_set(grpc_call_element* elem,
}
/* Destructor for call_data */
static void destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info,
static void connected_channel_destroy_call_elem(
grpc_call_element* elem, const grpc_call_final_info* final_info,
grpc_closure* then_schedule_closure) {
call_data* calld = static_cast<call_data*>(elem->call_data);
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
@ -177,8 +177,8 @@ static void destroy_call_elem(grpc_call_element* elem,
}
/* Constructor for channel_data */
static grpc_error* init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
static grpc_error* connected_channel_init_channel_elem(
grpc_channel_element* elem, grpc_channel_element_args* args) {
channel_data* cd = static_cast<channel_data*>(elem->channel_data);
GPR_ASSERT(args->is_last);
cd->transport = nullptr;
@ -186,7 +186,7 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem,
}
/* Destructor for channel_data */
static void destroy_channel_elem(grpc_channel_element* elem) {
static void connected_channel_destroy_channel_elem(grpc_channel_element* elem) {
channel_data* cd = static_cast<channel_data*>(elem->channel_data);
if (cd->transport) {
grpc_transport_destroy(cd->transport);
@ -194,20 +194,20 @@ static void destroy_channel_elem(grpc_channel_element* elem) {
}
/* No-op. */
static void con_get_channel_info(grpc_channel_element* elem,
const grpc_channel_info* channel_info) {}
static void connected_channel_get_channel_info(
grpc_channel_element* elem, const grpc_channel_info* channel_info) {}
const grpc_channel_filter grpc_connected_filter = {
con_start_transport_stream_op_batch,
con_start_transport_op,
connected_channel_start_transport_stream_op_batch,
connected_channel_start_transport_op,
sizeof(call_data),
init_call_elem,
connected_channel_init_call_elem,
set_pollset_or_pollset_set,
destroy_call_elem,
connected_channel_destroy_call_elem,
sizeof(channel_data),
init_channel_elem,
destroy_channel_elem,
con_get_channel_info,
connected_channel_init_channel_elem,
connected_channel_destroy_channel_elem,
connected_channel_get_channel_info,
"connected",
};

@ -905,7 +905,7 @@ static void channel_connectivity_changed(void* cd, grpc_error* error) {
}
}
static grpc_error* init_call_elem(grpc_call_element* elem,
static grpc_error* server_init_call_elem(grpc_call_element* elem,
const grpc_call_element_args* args) {
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
server_ref(chand->server);
@ -913,7 +913,7 @@ static grpc_error* init_call_elem(grpc_call_element* elem,
return GRPC_ERROR_NONE;
}
static void destroy_call_elem(grpc_call_element* elem,
static void server_destroy_call_elem(grpc_call_element* elem,
const grpc_call_final_info* final_info,
grpc_closure* ignored) {
call_data* calld = static_cast<call_data*>(elem->call_data);
@ -922,7 +922,7 @@ static void destroy_call_elem(grpc_call_element* elem,
server_unref(chand->server);
}
static grpc_error* init_channel_elem(grpc_channel_element* elem,
static grpc_error* server_init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
GPR_ASSERT(args->is_first);
@ -938,7 +938,7 @@ static grpc_error* init_channel_elem(grpc_channel_element* elem,
return GRPC_ERROR_NONE;
}
static void destroy_channel_elem(grpc_channel_element* elem) {
static void server_destroy_channel_elem(grpc_channel_element* elem) {
size_t i;
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
if (chand->registered_methods) {
@ -970,12 +970,12 @@ const grpc_channel_filter grpc_server_top_filter = {
server_start_transport_stream_op_batch,
grpc_channel_next_op,
sizeof(call_data),
init_call_elem,
server_init_call_elem,
grpc_call_stack_ignore_set_pollset_or_pollset_set,
destroy_call_elem,
server_destroy_call_elem,
sizeof(channel_data),
init_channel_elem,
destroy_channel_elem,
server_init_channel_elem,
server_destroy_channel_elem,
grpc_channel_next_get_info,
"server",
};

Loading…
Cancel
Save