diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-08 07:39:04 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-08 07:39:04 -0700 |
commit | 997fab6874cf953e45757c732f940bd95519df2a (patch) | |
tree | 8972ae437591aa6183f1d4d2f01f11f6e5737808 /src/ruby/ext | |
parent | fdb75f58e7ed1f9b9c80b5798e0bcbc7cca8918e (diff) |
Port Ruby to new API
Diffstat (limited to 'src/ruby/ext')
-rw-r--r-- | src/ruby/ext/grpc/rb_server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index bc0878af05..85ada1958b 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -123,7 +123,7 @@ static VALUE grpc_rb_server_init(VALUE self, VALUE cqueue, VALUE channel_args) { TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, wrapper); grpc_rb_hash_convert_to_channel_args(channel_args, &args); - srv = grpc_server_create(cq, &args); + srv = grpc_server_create(&args); if (args.args != NULL) { xfree(args.args); /* Allocated by grpc_rb_hash_convert_to_channel_args */ @@ -131,6 +131,7 @@ static VALUE grpc_rb_server_init(VALUE self, VALUE cqueue, VALUE channel_args) { if (srv == NULL) { rb_raise(rb_eRuntimeError, "could not create a gRPC server, not sure why"); } + grpc_server_register_completion_queue(srv, cq); wrapper->wrapped = srv; /* Add the cq as the server's mark object. This ensures the ruby cq can't be @@ -218,6 +219,7 @@ static VALUE grpc_rb_server_request_call(VALUE self, VALUE cqueue, err = grpc_server_request_call( s->wrapped, &call, &st.details, &st.md_ary, grpc_rb_get_wrapped_completion_queue(cqueue), + grpc_rb_get_wrapped_completion_queue(cqueue), ROBJECT(tag_new)); if (err != GRPC_CALL_OK) { grpc_request_call_stack_cleanup(&st); |