aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-02-10 14:05:03 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-02-10 14:05:03 -0800
commit85326964b017f1c9a211ec407e2b8002a7314705 (patch)
treee84a9d1848ea1128840a3bcf99da79a5bae99e4e /src/core
parent24be0f79e2a1a0b8beeb6141aa5dc83804d36a0d (diff)
Remove dead code
Diffstat (limited to 'src/core')
-rw-r--r--src/core/surface/server.c128
1 files changed, 0 insertions, 128 deletions
diff --git a/src/core/surface/server.c b/src/core/surface/server.c
index 0415949dac..972ac28cd2 100644
--- a/src/core/surface/server.c
+++ b/src/core/surface/server.c
@@ -922,134 +922,6 @@ static void publish_registered_or_batch(grpc_call *call, grpc_op_error status,
do_nothing, NULL, status);
}
-#if 0
-
-static void publish_request(grpc_call *call, grpc_op_error status, void *tag) {
- grpc_call_element *elem =
- grpc_call_stack_element(grpc_call_get_call_stack(call), 0);
- call_data *calld = elem->call_data;
- channel_data *chand = elem->channel_data;
- grpc_server *server = chand->server;
-
- if (status == GRPC_OP_OK) {
- cpstr(&calld->details->host, &calld->details->host_capacity, calld->host);
- cpstr(&calld->details->method, &calld->details->method_capacity,
- calld->path);
- calld->details->deadline = calld->deadline;
- grpc_cq_end_op_complete(server->cq, tag, call, do_nothing, NULL,
- GRPC_OP_OK);
- } else {
- abort();
- }
-}
-
-static void begin_request(grpc_server *server, grpc_completion_queue *cq,
- grpc_call **call, grpc_call_details *details,
- registered_method *registered_method, gpr_timespec *deadline,
- grpc_metadata_array *initial_metadata,
- grpc_byte_buffer **optional_payload,
- call_data *calld, void *tag) {
- grpc_ioreq req;
- GPR_ASSERT(registered_method == NULL);
- GPR_ASSERT(deadline == NULL);
- GPR_ASSERT(optional_payload == NULL);
- if (!calld) {
- *call = NULL;
- initial_metadata->count = 0;
- grpc_cq_end_op_complete(cq, tag, NULL, do_nothing, NULL, GRPC_OP_ERROR);
- return;
- }
- calld->details = details;
- grpc_call_set_completion_queue(calld->call, cq);
- *call = calld->call;
- req.op = GRPC_IOREQ_RECV_INITIAL_METADATA;
- req.data.recv_metadata = initial_metadata;
- grpc_call_internal_ref(calld->call);
- grpc_call_start_ioreq_and_call_back(calld->call, &req, 1, publish_request,
- tag);
-}
-
-static void begin_registered_request(grpc_server *server, grpc_completion_queue *cq,
- grpc_call **call, grpc_call_details *details,
- registered_method *registered_method, gpr_timespec *deadline,
- grpc_metadata_array *initial_metadata,
- grpc_byte_buffer **optional_payload,
- call_data *calld, void *tag) {
- grpc_ioreq req[2];
- grpc_ioreq *r;
- GPR_ASSERT(registered_method != NULL);
- GPR_ASSERT(deadline != NULL);
- GPR_ASSERT(optional_payload != NULL);
- if (!calld) {
- *call = NULL;
- initial_metadata->count = 0;
- grpc_cq_end_op_complete(cq, tag, NULL, do_nothing, NULL, GRPC_OP_ERROR);
- return;
- }
- calld->details = NULL;
- calld->registered_method = registered_method;
- grpc_call_set_completion_queue(calld->call, cq);
- *call = calld->call;
- r = req;
- r->op = GRPC_IOREQ_RECV_INITIAL_METADATA;
- r->data.recv_metadata = initial_metadata;
- r++;
- if (optional_payload != NULL) {
- r->op = GRPC_IOREQ_RECV_MESSAGE;
- r->data.recv_message = optional_payload;
- r++;
- }
- grpc_call_internal_ref(calld->call);
- grpc_call_start_ioreq_and_call_back(calld->call, req, r - rq, publish_request,
- tag);
-}
-
-static void publish_legacy_request(grpc_call *call, grpc_op_error status,
- void *tag) {
- grpc_call_element *elem =
- grpc_call_stack_element(grpc_call_get_call_stack(call), 0);
- call_data *calld = elem->call_data;
- channel_data *chand = elem->channel_data;
- grpc_server *server = chand->server;
-
- if (status == GRPC_OP_OK) {
- grpc_cq_end_new_rpc(server->cq, tag, call, do_nothing, NULL,
- grpc_mdstr_as_c_string(calld->path),
- grpc_mdstr_as_c_string(calld->host), calld->deadline,
- calld->legacy->initial_metadata->count,
- calld->legacy->initial_metadata->metadata);
- } else {
- abort();
- }
-}
-
-static void begin_legacy_request(grpc_server *server, grpc_completion_queue *cq,
- grpc_call **call, grpc_call_details *details,
- registered_method *registered_method, gpr_timespec *deadline,
- grpc_metadata_array *initial_metadata,
- grpc_byte_buffer **optional_payload,
- call_data *calld, void *tag) {
- grpc_ioreq req;
- GPR_ASSERT(call == NULL);
- GPR_ASSERT(details == NULL);
- if (!calld) {
- gpr_free(initial_metadata);
- grpc_cq_end_new_rpc(cq, tag, NULL, do_nothing, NULL, NULL, NULL,
- gpr_inf_past, 0, NULL);
- return;
- }
- req.op = GRPC_IOREQ_RECV_INITIAL_METADATA;
- req.data.recv_metadata = initial_metadata;
- calld->legacy = gpr_malloc(sizeof(legacy_data));
- memset(calld->legacy, 0, sizeof(legacy_data));
- calld->legacy->initial_metadata = initial_metadata;
- grpc_call_internal_ref(calld->call);
- grpc_call_start_ioreq_and_call_back(calld->call, &req, 1,
- publish_legacy_request, tag);
-}
-
-#endif
-
const grpc_channel_args *grpc_server_get_channel_args(grpc_server *server) {
return server->channel_args;
}