diff options
author | Craig Tiller <ctiller@google.com> | 2015-02-02 10:16:30 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-02-02 15:39:31 -0800 |
commit | c4f0ebe63bbd4b7f9ca551fd6dcb0df026464623 (patch) | |
tree | 09b0da67e8386833fecec4135c370708cb5bafec /test/core/fling | |
parent | d2bfa1a288f3eeccbee3275787d95128f2871017 (diff) |
Prepare for the new batch call API.
Rename all core API functions that are on their way to deprecation with
an _old tag across all wrappings.
Diffstat (limited to 'test/core/fling')
-rw-r--r-- | test/core/fling/client.c | 26 | ||||
-rw-r--r-- | test/core/fling/server.c | 18 |
2 files changed, 22 insertions, 22 deletions
diff --git a/test/core/fling/client.c b/test/core/fling/client.c index d6561e9961..cd2efc3cd0 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -53,15 +53,15 @@ static grpc_call *call; static void init_ping_pong_request(void) {} static void step_ping_pong_request(void) { - call = grpc_channel_create_call(channel, "/Reflector/reflectUnary", - "localhost", gpr_inf_future); - GPR_ASSERT(grpc_call_invoke(call, cq, (void *)1, (void *)1, - GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); - GPR_ASSERT(grpc_call_start_write(call, the_buffer, (void *)1, - GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); + call = grpc_channel_create_call_old(channel, "/Reflector/reflectUnary", + "localhost", gpr_inf_future); + GPR_ASSERT(grpc_call_invoke_old(call, cq, (void *)1, (void *)1, + GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_start_write_old(call, the_buffer, (void *)1, + GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); - GPR_ASSERT(grpc_call_start_read(call, (void *)1) == GRPC_CALL_OK); - GPR_ASSERT(grpc_call_writes_done(call, (void *)1) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_start_read_old(call, (void *)1) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_writes_done_old(call, (void *)1) == GRPC_CALL_OK); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); @@ -70,17 +70,17 @@ static void step_ping_pong_request(void) { } static void init_ping_pong_stream(void) { - call = grpc_channel_create_call(channel, "/Reflector/reflectStream", - "localhost", gpr_inf_future); - GPR_ASSERT(grpc_call_invoke(call, cq, (void *)1, (void *)1, 0) == + call = grpc_channel_create_call_old(channel, "/Reflector/reflectStream", + "localhost", gpr_inf_future); + GPR_ASSERT(grpc_call_invoke_old(call, cq, (void *)1, (void *)1, 0) == GRPC_CALL_OK); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); } static void step_ping_pong_stream(void) { - GPR_ASSERT(grpc_call_start_write(call, the_buffer, (void *)1, 0) == + GPR_ASSERT(grpc_call_start_write_old(call, the_buffer, (void *)1, 0) == GRPC_CALL_OK); - GPR_ASSERT(grpc_call_start_read(call, (void *)1) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_start_read_old(call, (void *)1) == GRPC_CALL_OK); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); grpc_event_finish(grpc_completion_queue_next(cq, gpr_inf_future)); } diff --git a/test/core/fling/server.c b/test/core/fling/server.c index f811aac284..ba5e96ddc0 100644 --- a/test/core/fling/server.c +++ b/test/core/fling/server.c @@ -62,7 +62,7 @@ typedef struct { static void request_call(void) { call_state *s = gpr_malloc(sizeof(call_state)); gpr_ref_init(&s->pending_ops, 2); - grpc_server_request_call(server, s); + grpc_server_request_call_old(server, s); } static void sigint_handler(int x) { got_sigint = 1; } @@ -142,9 +142,9 @@ int main(int argc, char **argv) { } else { s->flags = GRPC_WRITE_BUFFER_HINT; } - grpc_call_server_accept(ev->call, cq, s); - grpc_call_server_end_initial_metadata(ev->call, s->flags); - GPR_ASSERT(grpc_call_start_read(ev->call, s) == GRPC_CALL_OK); + grpc_call_server_accept_old(ev->call, cq, s); + grpc_call_server_end_initial_metadata_old(ev->call, s->flags); + GPR_ASSERT(grpc_call_start_read_old(ev->call, s) == GRPC_CALL_OK); request_call(); } else { GPR_ASSERT(shutdown_started); @@ -153,15 +153,15 @@ int main(int argc, char **argv) { break; case GRPC_WRITE_ACCEPTED: GPR_ASSERT(ev->data.write_accepted == GRPC_OP_OK); - GPR_ASSERT(grpc_call_start_read(ev->call, s) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_start_read_old(ev->call, s) == GRPC_CALL_OK); break; case GRPC_READ: if (ev->data.read) { - GPR_ASSERT(grpc_call_start_write(ev->call, ev->data.read, s, - s->flags) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_start_write_old(ev->call, ev->data.read, s, + s->flags) == GRPC_CALL_OK); } else { - GPR_ASSERT(grpc_call_start_write_status(ev->call, GRPC_STATUS_OK, - NULL, s) == GRPC_CALL_OK); + GPR_ASSERT(grpc_call_start_write_status_old(ev->call, GRPC_STATUS_OK, + NULL, s) == GRPC_CALL_OK); } break; case GRPC_FINISH_ACCEPTED: |